gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18745 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r18745 - gnunet/src/transport
Date: Wed, 21 Dec 2011 15:47:22 +0100

Author: wachs
Date: 2011-12-21 15:47:22 +0100 (Wed, 21 Dec 2011)
New Revision: 18745

Modified:
   gnunet/src/transport/plugin_transport_udp.c
Log:
- minor change


Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2011-12-21 14:35:00 UTC (rev 
18744)
+++ gnunet/src/transport/plugin_transport_udp.c 2011-12-21 14:47:22 UTC (rev 
18745)
@@ -2351,16 +2351,20 @@
       /* Join the multicast group */
       if (GNUNET_NETWORK_socket_setsockopt
           (plugin->sockv6, IPPROTO_IPV6, IPV6_JOIN_GROUP,
-           (char *) &multicastRequest, sizeof (multicastRequest)) == GNUNET_OK)
+           (char *) &multicastRequest, sizeof (multicastRequest)) != GNUNET_OK)
       {
+        LOG (GNUNET_ERROR_TYPE_WARNING,
+        "Failed to join IPv6 multicast group: IPv6 broadcasting not 
running\n");
+      }
+      else
+      {
+#if DEBUG_UDP
         LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting running\n");
-
+#endif
         plugin->send_ipv6_broadcast_task =
             GNUNET_SCHEDULER_add_now (&udp_ipv6_broadcast_send, plugin);
         plugin->broadcast_ipv6 = GNUNET_YES;
       }
-      else
-        LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting not running\n");
     }
   }
 
@@ -2442,12 +2446,16 @@
     /* Join the multicast address */
     if (GNUNET_NETWORK_socket_setsockopt
         (plugin->sockv6, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
-         (char *) &multicastRequest, sizeof (multicastRequest)) == GNUNET_OK)
+        (char *) &multicastRequest, sizeof (multicastRequest)) != GNUNET_OK)
     {
+       GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, setsockopt);
+    }
+    else
+    {
+#if DEBUG_UDP
       LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 Broadcasting stopped\n");
+#endif
     }
-    else
-      GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, setsockopt);
 
     if (plugin->send_ipv6_broadcast_task != GNUNET_SCHEDULER_NO_TASK)
     {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]