report errors
authorChristian Grothoff <christian@grothoff.org>
Mon, 26 Oct 2009 11:14:00 +0000 (11:14 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 26 Oct 2009 11:14:00 +0000 (11:14 +0000)
src/util/network.c

index dfdd44fa60d80bbd4c1379ee1338b575411f830a..d3e93a8d58a188622b2ed17b1ae38cd5a7cf93cb 100644 (file)
@@ -135,7 +135,9 @@ socket_set_nosigpipe (const struct GNUNET_NETWORK_Handle
                    *h)\r
 {\r
   int value = 1;\r
-  setsockopt (h->fd, SOL_SOCKET, SO_NOSIGPIPE, &value, sizeof(value));\r
+  if (0 != setsockopt (h->fd, SOL_SOCKET, SO_NOSIGPIPE, &value, sizeof(value)))\r
+    GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING,\r
+                        "setsockopt");\r
 }\r
 #endif\r
 \r