[glib] gsocket: Use alternate IPv6 multicast group sockopt names



commit 7dfbe5aa3040d042131b9ff8ac1be0568d56303a
Author: Dan Winship <danw gnome org>
Date:   Mon Jan 16 17:15:06 2012 -0500

    gsocket: Use alternate IPv6 multicast group sockopt names
    
    Apparently IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP are more portable than
    IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP. (Windows and Linux have
    both, but OS X only has the latter.)

 gio/gsocket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsocket.c b/gio/gsocket.c
index 05ad39b..bce38f5 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -1950,7 +1950,7 @@ g_socket_multicast_group_operation (GSocket       *socket,
       else
         mc_req_ipv6.ipv6mr_interface = 0;
 
-      optname = join_group ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP;
+      optname = join_group ? IPV6_JOIN_GROUP : IPV6_LEAVE_GROUP;
       result = setsockopt (socket->priv->fd, IPPROTO_IPV6, optname,
 			   &mc_req_ipv6, sizeof (mc_req_ipv6));
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]