summaryrefslogtreecommitdiff
path: root/network_io/unix
diff options
context:
space:
mode:
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2012-04-04 13:39:48 +0000
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2012-04-04 13:39:48 +0000
commit0f0b3805c68bbaa82dc7ca271d555de86e1c57af (patch)
treeafb33a67ac0506ec18ce4c67e2a6b24c1761bbbb /network_io/unix
parent103c2cc518eed6832cd401207be0ab70424e7aef (diff)
downloadlibapr-0f0b3805c68bbaa82dc7ca271d555de86e1c57af.tar.gz
Simplify internal do_mcast_opt option path. No need for double checks and double code
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1309379 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io/unix')
-rw-r--r--network_io/unix/multicast.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/network_io/unix/multicast.c b/network_io/unix/multicast.c
index 81051a18d..d6e2ca7b7 100644
--- a/network_io/unix/multicast.c
+++ b/network_io/unix/multicast.c
@@ -208,17 +208,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) {
- 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;
}