X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udevsend.c;h=9f5059a4c806173d04025f296be6f79d63717839;hb=9571122e00f54b5d6e5accda4c431ac6ae5c4847;hp=8cabe9039bcf061a708260511dd9bd8e4b18c424;hpb=4389ec08fb177f62fc02eb2217fed126aef3a7a3;p=elogind.git diff --git a/udevsend.c b/udevsend.c index 8cabe9039..9f5059a4c 100644 --- a/udevsend.c +++ b/udevsend.c @@ -30,12 +30,9 @@ #include #include #include -#include #include "udev.h" -#include "udev_version.h" #include "udevd.h" -#include "logging.h" /* global variables */ static int sock = -1; @@ -67,7 +64,7 @@ int main(int argc, char *argv[], char *envp[]) logging_init("udevsend"); #ifdef USE_LOG - udev_init_config(); + udev_config_init(); #endif dbg("version %s", UDEV_VERSION); @@ -96,6 +93,13 @@ int main(int argc, char *argv[], char *envp[]) key = envp[i]; keylen = strlen(key); + /* ignore events which are already sent on the netlink socket */ + if (strncmp(key, "SEQNUM=", 7) == 0) { + dbg("ignoring event with SEQNUM set"); + retval = 0; + goto exit; + } + /* prevent loops in the scripts we execute */ if (strncmp(key, "UDEVD_EVENT=", 12) == 0) { err("event loop, already passed through the daemon, exit");