diff options
Diffstat (limited to 'src/util/gnunet-service-resolver.c')
-rw-r--r-- | src/util/gnunet-service-resolver.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c index c8d510770..f2cd52ddd 100644 --- a/src/util/gnunet-service-resolver.c +++ b/src/util/gnunet-service-resolver.c | |||
@@ -275,12 +275,7 @@ getaddrinfo_resolve (struct GNUNET_SERVER_TransmitContext *tc, | |||
275 | struct addrinfo *pos; | 275 | struct addrinfo *pos; |
276 | 276 | ||
277 | memset (&hints, 0, sizeof (struct addrinfo)); | 277 | memset (&hints, 0, sizeof (struct addrinfo)); |
278 | // FIXME in PlibC | ||
279 | #ifndef MINGW | ||
280 | hints.ai_family = af; | 278 | hints.ai_family = af; |
281 | #else | ||
282 | hints.ai_family = AF_INET; | ||
283 | #endif | ||
284 | hints.ai_socktype = SOCK_STREAM; /* go for TCP */ | 279 | hints.ai_socktype = SOCK_STREAM; /* go for TCP */ |
285 | 280 | ||
286 | if (0 != (s = getaddrinfo (hostname, NULL, &hints, &result))) | 281 | if (0 != (s = getaddrinfo (hostname, NULL, &hints, &result))) |
@@ -291,10 +286,9 @@ getaddrinfo_resolve (struct GNUNET_SERVER_TransmitContext *tc, | |||
291 | AF_INET) ? "IPv4" : ((af == AF_INET6) ? "IPv6" : "any"), | 286 | AF_INET) ? "IPv4" : ((af == AF_INET6) ? "IPv6" : "any"), |
292 | gai_strerror (s)); | 287 | gai_strerror (s)); |
293 | if ((s == EAI_BADFLAGS) || (s == EAI_MEMORY) | 288 | if ((s == EAI_BADFLAGS) || (s == EAI_MEMORY) |
294 | #ifndef MINGW | 289 | #ifndef WINDOWS |
295 | || (s == EAI_SYSTEM) | 290 | || (s == EAI_SYSTEM) |
296 | #else | 291 | #else |
297 | // FIXME NILS | ||
298 | || 1 | 292 | || 1 |
299 | #endif | 293 | #endif |
300 | ) | 294 | ) |
@@ -303,8 +297,7 @@ getaddrinfo_resolve (struct GNUNET_SERVER_TransmitContext *tc, | |||
303 | } | 297 | } |
304 | if (result == NULL) | 298 | if (result == NULL) |
305 | return GNUNET_SYSERR; | 299 | return GNUNET_SYSERR; |
306 | pos = result; | 300 | for (pos = result; pos != NULL; pos = pos->ai_next) |
307 | while (pos != NULL) | ||
308 | { | 301 | { |
309 | switch (pos->ai_family) | 302 | switch (pos->ai_family) |
310 | { | 303 | { |
@@ -324,7 +317,6 @@ getaddrinfo_resolve (struct GNUNET_SERVER_TransmitContext *tc, | |||
324 | /* unsupported, skip */ | 317 | /* unsupported, skip */ |
325 | break; | 318 | break; |
326 | } | 319 | } |
327 | pos = pos->ai_next; | ||
328 | } | 320 | } |
329 | freeaddrinfo (result); | 321 | freeaddrinfo (result); |
330 | return GNUNET_OK; | 322 | return GNUNET_OK; |