diff options
Diffstat (limited to 'src/util/gnunet-service-resolver.c')
-rw-r--r-- | src/util/gnunet-service-resolver.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c index cab13ae57..c8d510770 100644 --- a/src/util/gnunet-service-resolver.c +++ b/src/util/gnunet-service-resolver.c | |||
@@ -213,7 +213,7 @@ get_ip_as_string (struct GNUNET_SERVER_Client *client, | |||
213 | next = cache_head; | 213 | next = cache_head; |
214 | while ( (NULL != (pos = next)) && | 214 | while ( (NULL != (pos = next)) && |
215 | ( (pos->af != af) || | 215 | ( (pos->af != af) || |
216 | (pos->ip_len != ip_len) || | 216 | (pos->ip_len != ip_len) || |
217 | (0 != memcmp (pos->ip, ip, ip_len))) ) | 217 | (0 != memcmp (pos->ip, ip, ip_len))) ) |
218 | { | 218 | { |
219 | next = pos->next; | 219 | next = pos->next; |
@@ -323,7 +323,7 @@ getaddrinfo_resolve (struct GNUNET_SERVER_TransmitContext *tc, | |||
323 | default: | 323 | default: |
324 | /* unsupported, skip */ | 324 | /* unsupported, skip */ |
325 | break; | 325 | break; |
326 | } | 326 | } |
327 | pos = pos->ai_next; | 327 | pos = pos->ai_next; |
328 | } | 328 | } |
329 | freeaddrinfo (result); | 329 | freeaddrinfo (result); |
@@ -364,15 +364,15 @@ gethostbyname2_resolve (struct GNUNET_SERVER_TransmitContext *tc, | |||
364 | { | 364 | { |
365 | case AF_INET: | 365 | case AF_INET: |
366 | GNUNET_assert (hp->h_length == sizeof (struct in_addr)); | 366 | GNUNET_assert (hp->h_length == sizeof (struct in_addr)); |
367 | GNUNET_SERVER_transmit_context_append_data (tc, | 367 | GNUNET_SERVER_transmit_context_append_data (tc, |
368 | hp->h_addr_list[0], | 368 | hp->h_addr_list[0], |
369 | hp->h_length, | 369 | hp->h_length, |
370 | GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE); | 370 | GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE); |
371 | break; | 371 | break; |
372 | case AF_INET6: | 372 | case AF_INET6: |
373 | GNUNET_assert (hp->h_length == sizeof (struct in6_addr)); | 373 | GNUNET_assert (hp->h_length == sizeof (struct in6_addr)); |
374 | GNUNET_SERVER_transmit_context_append_data (tc, | 374 | GNUNET_SERVER_transmit_context_append_data (tc, |
375 | hp->h_addr_list[0], | 375 | hp->h_addr_list[0], |
376 | hp->h_length, | 376 | hp->h_length, |
377 | GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE); | 377 | GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE); |
378 | break; | 378 | break; |
@@ -406,7 +406,7 @@ gethostbyname_resolve (struct GNUNET_SERVER_TransmitContext *tc, | |||
406 | return GNUNET_SYSERR; | 406 | return GNUNET_SYSERR; |
407 | } | 407 | } |
408 | GNUNET_assert (hp->h_length == sizeof (struct in_addr)); | 408 | GNUNET_assert (hp->h_length == sizeof (struct in_addr)); |
409 | GNUNET_SERVER_transmit_context_append_data (tc, | 409 | GNUNET_SERVER_transmit_context_append_data (tc, |
410 | hp->h_addr_list[0], | 410 | hp->h_addr_list[0], |
411 | hp->h_length, | 411 | hp->h_length, |
412 | GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE); | 412 | GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE); |
@@ -482,7 +482,7 @@ handle_get (void *cls, struct GNUNET_SERVER_Client *client, | |||
482 | { | 482 | { |
483 | /* IP from hostname */ | 483 | /* IP from hostname */ |
484 | const char *hostname; | 484 | const char *hostname; |
485 | 485 | ||
486 | hostname = (const char *) &msg[1]; | 486 | hostname = (const char *) &msg[1]; |
487 | if (hostname[size - 1] != '\0') | 487 | if (hostname[size - 1] != '\0') |
488 | { | 488 | { |
@@ -521,12 +521,12 @@ handle_get (void *cls, struct GNUNET_SERVER_Client *client, | |||
521 | } | 521 | } |
522 | { | 522 | { |
523 | char buf[INET6_ADDRSTRLEN]; | 523 | char buf[INET6_ADDRSTRLEN]; |
524 | 524 | ||
525 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 525 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
526 | "Resolver asked to look up IP address `%s'.\n", | 526 | "Resolver asked to look up IP address `%s'.\n", |
527 | inet_ntop (af, ip, buf, sizeof (buf))); | 527 | inet_ntop (af, ip, buf, sizeof (buf))); |
528 | } | 528 | } |
529 | get_ip_as_string (client, af, ip); | 529 | get_ip_as_string (client, af, ip); |
530 | } | 530 | } |
531 | 531 | ||
532 | 532 | ||