X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udevsend.c;h=1b9860baca5ecfbf6537958a4a0edc27265a4722;hp=8cabe9039bcf061a708260511dd9bd8e4b18c424;hb=42878445d73b19096e068e50a0ab86c9fa047c63;hpb=4389ec08fb177f62fc02eb2217fed126aef3a7a3 diff --git a/udevsend.c b/udevsend.c index 8cabe9039..1b9860bac 100644 --- a/udevsend.c +++ b/udevsend.c @@ -33,9 +33,7 @@ #include #include "udev.h" -#include "udev_version.h" #include "udevd.h" -#include "logging.h" /* global variables */ static int sock = -1; @@ -67,7 +65,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 +94,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");