aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-12-21 14:47:22 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-12-21 14:47:22 +0000
commit30992de68803d6842e25d23cec3254e5e1569748 (patch)
tree3814fda57f5f8b847bbe1f2614293714671c29dd /src
parent67b59bad2903f7a4a5fd81977e739600dd225f38 (diff)
downloadgnunet-30992de68803d6842e25d23cec3254e5e1569748.tar.gz
gnunet-30992de68803d6842e25d23cec3254e5e1569748.zip
- minor change
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_udp.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 29c4c8c1d..7e28dd98b 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -2351,16 +2351,20 @@ libgnunet_plugin_transport_udp_init (void *cls)
2351 /* Join the multicast group */ 2351 /* Join the multicast group */
2352 if (GNUNET_NETWORK_socket_setsockopt 2352 if (GNUNET_NETWORK_socket_setsockopt
2353 (plugin->sockv6, IPPROTO_IPV6, IPV6_JOIN_GROUP, 2353 (plugin->sockv6, IPPROTO_IPV6, IPV6_JOIN_GROUP,
2354 (char *) &multicastRequest, sizeof (multicastRequest)) == GNUNET_OK) 2354 (char *) &multicastRequest, sizeof (multicastRequest)) != GNUNET_OK)
2355 { 2355 {
2356 LOG (GNUNET_ERROR_TYPE_WARNING,
2357 "Failed to join IPv6 multicast group: IPv6 broadcasting not running\n");
2358 }
2359 else
2360 {
2361#if DEBUG_UDP
2356 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting running\n"); 2362 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting running\n");
2357 2363#endif
2358 plugin->send_ipv6_broadcast_task = 2364 plugin->send_ipv6_broadcast_task =
2359 GNUNET_SCHEDULER_add_now (&udp_ipv6_broadcast_send, plugin); 2365 GNUNET_SCHEDULER_add_now (&udp_ipv6_broadcast_send, plugin);
2360 plugin->broadcast_ipv6 = GNUNET_YES; 2366 plugin->broadcast_ipv6 = GNUNET_YES;
2361 } 2367 }
2362 else
2363 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting not running\n");
2364 } 2368 }
2365 } 2369 }
2366 2370
@@ -2442,12 +2446,16 @@ libgnunet_plugin_transport_udp_done (void *cls)
2442 /* Join the multicast address */ 2446 /* Join the multicast address */
2443 if (GNUNET_NETWORK_socket_setsockopt 2447 if (GNUNET_NETWORK_socket_setsockopt
2444 (plugin->sockv6, IPPROTO_IPV6, IPV6_LEAVE_GROUP, 2448 (plugin->sockv6, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
2445 (char *) &multicastRequest, sizeof (multicastRequest)) == GNUNET_OK) 2449 (char *) &multicastRequest, sizeof (multicastRequest)) != GNUNET_OK)
2446 { 2450 {
2447 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 Broadcasting stopped\n"); 2451 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, setsockopt);
2448 } 2452 }
2449 else 2453 else
2450 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, setsockopt); 2454 {
2455#if DEBUG_UDP
2456 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 Broadcasting stopped\n");
2457#endif
2458 }
2451 2459
2452 if (plugin->send_ipv6_broadcast_task != GNUNET_SCHEDULER_NO_TASK) 2460 if (plugin->send_ipv6_broadcast_task != GNUNET_SCHEDULER_NO_TASK)
2453 { 2461 {