From: Lennart Poettering Date: Sat, 6 Jan 2007 16:10:47 +0000 (+0000) Subject: create unicast IPv4 socket oly if IPv4 is enabled, same for unicast IPv6 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=81abdde5ccc144c160791bdfca1c9e2cadeef2e5;p=catta create unicast IPv4 socket oly if IPv4 is enabled, same for unicast IPv6 git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1371 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-core/wide-area.c b/avahi-core/wide-area.c index 4072f83..bf3f60d 100644 --- a/avahi-core/wide-area.c +++ b/avahi-core/wide-area.c @@ -579,8 +579,8 @@ AvahiWideAreaLookupEngine *avahi_wide_area_engine_new(AvahiServer *s) { e->cleanup_dead = 0; /* Create sockets */ - e->fd_ipv4 = avahi_open_unicast_socket_ipv4(); - e->fd_ipv6 = avahi_open_unicast_socket_ipv6(); + e->fd_ipv4 = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1; + e->fd_ipv6 = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1; if (e->fd_ipv4 < 0 && e->fd_ipv6 < 0) { avahi_log_error(__FILE__": Failed to create wide area sockets: %s", strerror(errno));