diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-01-06 16:10:47 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-01-06 16:10:47 +0000 |
commit | 81abdde5ccc144c160791bdfca1c9e2cadeef2e5 (patch) | |
tree | c1dc9ddfcad43614c25c677b0f9615f6cc83337f | |
parent | d39a5d3be8041cbf6fb93c274d49473c0cd1c4ea (diff) |
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
-rw-r--r-- | avahi-core/wide-area.c | 4 |
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)); |