apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1309379 - /apr/apr/trunk/network_io/unix/multicast.c
Date Wed, 04 Apr 2012 13:39:49 GMT
Author: mturk
Date: Wed Apr  4 13:39:48 2012
New Revision: 1309379

URL: http://svn.apache.org/viewvc?rev=1309379&view=rev
Log:
Simplify internal do_mcast_opt option path. No need for double checks and double code

Modified:
    apr/apr/trunk/network_io/unix/multicast.c

Modified: apr/apr/trunk/network_io/unix/multicast.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/multicast.c?rev=1309379&r1=1309378&r2=1309379&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/multicast.c (original)
+++ apr/apr/trunk/network_io/unix/multicast.c Wed Apr  4 13:39:48 2012
@@ -208,17 +208,13 @@ static apr_status_t do_mcast_opt(int typ
         }
     }
 #if APR_HAVE_IPV6
-    else if (sock_is_ipv6(sock) && type == IP_MULTICAST_LOOP) {
-        type = IPV6_MULTICAST_LOOP;
-        if (setsockopt(sock->socketdes, IPPROTO_IPV6, type,
-                       (const void *) &value, sizeof(value)) == -1) {
-            rv = errno;
-        }
-    }
     else if (sock_is_ipv6(sock)) {
         if (type == IP_MULTICAST_TTL) {
             type = IPV6_MULTICAST_HOPS;
         }
+        else if (type == IP_MULTICAST_LOOP) {
+            type = IPV6_MULTICAST_LOOP;
+        }
         else {
             return APR_ENOTIMPL;
         }



Mime
View raw message