]> git.meshlink.io Git - catta/commitdiff
create unicast IPv4 socket oly if IPv4 is enabled, same for unicast IPv6
authorLennart Poettering <lennart@poettering.net>
Sat, 6 Jan 2007 16:10:47 +0000 (16:10 +0000)
committerLennart Poettering <lennart@poettering.net>
Sat, 6 Jan 2007 16:10:47 +0000 (16:10 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1371 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/wide-area.c

index 4072f831e7771658e6a047f7d19db901534a3ba5..bf3f60de03b92bc47a1ae41c39f3b4e93a2dc8a3 100644 (file)
@@ -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));