summaryrefslogtreecommitdiffstats
path: root/avahi-core/wide-area.c
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-core/wide-area.c')
-rw-r--r--avahi-core/wide-area.c4
1 files changed, 2 insertions, 2 deletions
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));