cleaner
authorChristian Grothoff <christian@grothoff.org>
Tue, 21 Dec 2010 16:17:05 +0000 (16:17 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 21 Dec 2010 16:17:05 +0000 (16:17 +0000)
src/util/network.c

index 3b76a35d1fad8b5c6ee1aa838e6edf8b2a5a7c23..08121928db6ee69312b571f4c48878ab68aeebeb 100644 (file)
@@ -270,10 +270,12 @@ GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc,
 #ifdef IPPROTO_IPV6
   const int on = 1;
   if (desc->af == AF_INET6)
-    setsockopt (desc->fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof (on));
+    if (0 != setsockopt (desc->fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof (on)))
+      GNUNET_log_strerror (GNUNET_ERROR_TYPE_DEBUG, "setsockopt");
 #if 0
   /* is this needed or desired? or done elsewhere? */
-  setsockopt (desc->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof (on));
+  if (0 != setsockopt (desc->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof (on)))
+    GNUNET_log_strerror (GNUNET_ERROR_TYPE_DEBUG, "setsockopt");
 #endif
 #endif
 #endif