]> git.meshlink.io Git - catta/blobdiff - avahi-core/netlink.c
forgot to pull the publish_no_reverse change to the example.
[catta] / avahi-core / netlink.c
index d109358c68b2dc5a26ab50884e937b94ff5f2ece..acea6968a88592e1b7f34ad069252ba341998280 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /***
   This file is part of avahi.
 
@@ -130,7 +128,7 @@ AvahiNetlink *avahi_netlink_new(const AvahiPoll *poll_api, uint32_t groups, void
     memset(&addr, 0, sizeof(addr));
     addr.nl_family = AF_NETLINK;
     addr.nl_groups = groups;
-    addr.nl_pid = getpid();
+    addr.nl_pid = 0; // use 0 instead of getpid() to allow multiple instances of avahi in one process
 
     if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
         avahi_log_error(__FILE__": bind(): %s", strerror(errno));