summaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-03-22 18:01:38 +0000
committerLennart Poettering <lennart@poettering.net>2005-03-22 18:01:38 +0000
commit54247ce93dc6f048c0ffea546f454653ce0e25a8 (patch)
treec0ea9dfd389be853544df00711da288d698741ec /socket.c
parentf0f4bb0c37eeed71934e3191cffa5afb1cfdca0d (diff)
make the daemon response to queries
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@13 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/socket.c b/socket.c
index 48cfb36..1887e1d 100644
--- a/socket.c
+++ b/socket.c
@@ -29,7 +29,7 @@ static void mdns_mcast_group_ipv4(struct sockaddr_in *ret_sa) {
gint flx_open_socket_ipv4(void) {
struct ip_mreqn mreq;
struct sockaddr_in sa, local;
- int fd = -1, ttl, yes, no;
+ int fd = -1, ttl, yes;
mdns_mcast_group_ipv4(&sa);
@@ -56,8 +56,8 @@ gint flx_open_socket_ipv4(void) {
goto fail;
}
- no = 0;
- if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &no, sizeof(no)) < 0) {
+ yes = 1;
+ if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) {
g_warning("IP_MULTICAST_LOOP failed: %s\n", strerror(errno));
goto fail;
}
@@ -127,7 +127,7 @@ static void mdns_mcast_group_ipv6(struct sockaddr_in6 *ret_sa) {
gint flx_open_socket_ipv6(void) {
struct ipv6_mreq mreq;
struct sockaddr_in6 sa, local;
- int fd = -1, ttl, yes, no;
+ int fd = -1, ttl, yes;
mdns_mcast_group_ipv6(&sa);
@@ -160,8 +160,8 @@ gint flx_open_socket_ipv6(void) {
goto fail;
}
- no = 0;
- if (setsockopt(fd, SOL_IPV6, IPV6_MULTICAST_LOOP, &no, sizeof(no)) < 0) {
+ yes = 1;
+ if (setsockopt(fd, SOL_IPV6, IPV6_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) {
g_warning("IPV6_MULTICAST_LOOP failed: %s\n", strerror(errno));
goto fail;
}