summaryrefslogtreecommitdiff
path: root/network_io/unix
diff options
context:
space:
mode:
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2012-04-04 13:33:26 +0000
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2012-04-04 13:33:26 +0000
commit103c2cc518eed6832cd401207be0ab70424e7aef (patch)
tree27e3e1fa8ec7713b227f6db1d0f4a1518822f728 /network_io/unix
parenta3ace8dfdbb45ca13fd245787a112fd3666fdb09 (diff)
downloadlibapr-103c2cc518eed6832cd401207be0ab70424e7aef.tar.gz
Make sure the IPv4 setsockopt also uses 4 byte optval type.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1309376 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io/unix')
-rw-r--r--network_io/unix/multicast.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/network_io/unix/multicast.c b/network_io/unix/multicast.c
index 18786b4d4..81051a18d 100644
--- a/network_io/unix/multicast.c
+++ b/network_io/unix/multicast.c
@@ -197,7 +197,7 @@ static apr_status_t do_mcast(int type, apr_socket_t *sock,
}
static apr_status_t do_mcast_opt(int type, apr_socket_t *sock,
- apr_byte_t value)
+ apr_uint32_t value)
{
apr_status_t rv = APR_SUCCESS;
@@ -209,15 +209,13 @@ static apr_status_t do_mcast_opt(int type, apr_socket_t *sock,
}
#if APR_HAVE_IPV6
else if (sock_is_ipv6(sock) && type == IP_MULTICAST_LOOP) {
- unsigned int loopopt = value;
type = IPV6_MULTICAST_LOOP;
if (setsockopt(sock->socketdes, IPPROTO_IPV6, type,
- (const void *) &loopopt, sizeof(loopopt)) == -1) {
+ (const void *) &value, sizeof(value)) == -1) {
rv = errno;
}
}
else if (sock_is_ipv6(sock)) {
- unsigned int hopsopt = value;
if (type == IP_MULTICAST_TTL) {
type = IPV6_MULTICAST_HOPS;
}
@@ -226,7 +224,7 @@ static apr_status_t do_mcast_opt(int type, apr_socket_t *sock,
}
if (setsockopt(sock->socketdes, IPPROTO_IPV6, type,
- (const void *) &hopsopt, sizeof(hopsopt)) == -1) {
+ (const void *) &value, sizeof(value)) == -1) {
rv = errno;
}
}