From 5b3c889e3795aff706409921b622228a43d04205 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 20 Jun 2011 09:15:18 +0000 Subject: [PATCH] avoid duplicate binds --- src/util/service.c | 4 ++++ src/util/test_resolver_api.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/service.c b/src/util/service.c index a82b9d12b..1e70e3ada 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -1024,6 +1024,10 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName, next = pos->ai_next; if ( (disablev6) && (pos->ai_family == AF_INET6)) continue; + if (pos->ai_protocol != IPPROTO_TCP) + continue; /* not TCP */ + if (pos->ai_socktype != SOCK_STREAM) + continue; /* huh? */ #if DEBUG_SERVICE GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service `%s' will bind to `%s'\n", diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index be631e36f..39cfa43fc 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c @@ -359,7 +359,6 @@ run(void *cls, char * const *args, GNUNET_RESOLVER_ip_get("localhost", AF_INET, timeout, &check_127, cls); - fprintf (stderr, "Trying to get hostname for 127.0.0.1\n"); GNUNET_RESOLVER_hostname_get((const struct sockaddr *) &sa, sizeof(struct sockaddr), GNUNET_YES, timeout, &check_localhost, cls); -- 2.25.1