From 7a5b2f69af7d36d6cd4153142f125fa011784e03 Mon Sep 17 00:00:00 2001 From: Niklas Hofmann Date: Fri, 8 Aug 2014 16:59:39 +0200 Subject: [PATCH] fix avahi_netlink_new to allow multiple netlinks per process --- avahi-core/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.39.5