From: Niklas Hofmann Date: Fri, 8 Aug 2014 14:59:39 +0000 (+0200) Subject: fix avahi_netlink_new to allow multiple netlinks per process X-Git-Url: http://git.meshlink.io/?p=catta;a=commitdiff_plain;h=7a5b2f69af7d36d6cd4153142f125fa011784e03 fix avahi_netlink_new to allow multiple netlinks per process --- diff --git a/avahi-core/netlink.c b/avahi-core/netlink.c index 4ded5ec..acea696 100644 --- a/avahi-core/netlink.c +++ b/avahi-core/netlink.c @@ -128,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));