apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1309332 - /apr/apr/trunk/network_io/unix/multicast.c
Date Wed, 04 Apr 2012 11:20:43 GMT
Author: mturk
Date: Wed Apr  4 11:20:43 2012
New Revision: 1309332

URL: http://svn.apache.org/viewvc?rev=1309332&view=rev
Log:
Fix apr_mcast_hops returning EINVAL for IPv6 sockets. The soket option value is supposed to
be 4 not 1 byte.

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=1309332&r1=1309331&r2=1309332&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/multicast.c (original)
+++ apr/apr/trunk/network_io/unix/multicast.c Wed Apr  4 11:20:43 2012
@@ -217,6 +217,7 @@ static apr_status_t do_mcast_opt(int typ
         }
     }
     else if (sock_is_ipv6(sock)) {
+        unsigned int hopsopt = value;
         if (type == IP_MULTICAST_TTL) {
             type = IPV6_MULTICAST_HOPS;
         }
@@ -225,7 +226,7 @@ static apr_status_t do_mcast_opt(int typ
         }
 
         if (setsockopt(sock->socketdes, IPPROTO_IPV6, type,
-                       &value, sizeof(value)) == -1) {
+                       (const void *) &hopsopt, sizeof(hopsopt)) == -1) {
             rv = errno;
         }
     }



Mime
View raw message