From 81e0ff5318afd7a407395146ff686065f3e76eac Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 15 Jun 2012 10:46:57 +0000 Subject: [PATCH] -remove duplicate setsockopt calls; GNUNET_NETWORK_socket_bind does those already anyway --- src/util/server.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/util/server.c b/src/util/server.c index 409e89f16..c21b9e2db 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -454,20 +454,6 @@ open_listen_socket (const struct sockaddr *serverAddr, socklen_t socklen) errno = 0; return NULL; } - if (0 != port) - { - if (GNUNET_NETWORK_socket_setsockopt - (sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof (on)) != GNUNET_OK) - LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, - "setsockopt"); -#ifdef IPV6_V6ONLY - if ((AF_INET6 == serverAddr->sa_family) && - (GNUNET_NETWORK_socket_setsockopt - (sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof (on)) != GNUNET_OK)) - LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, - "setsockopt"); -#endif - } /* bind the socket */ if (GNUNET_OK != GNUNET_NETWORK_socket_bind (sock, serverAddr, socklen)) { -- 2.25.1