diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-11-13 20:26:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-11-13 20:26:47 +0000 |
commit | 052607fbf75f85c555acb999fb4ecfbd1cfeb4c6 (patch) | |
tree | 81804e5ca32dbb01a8340ecde5ebd340b0c0d2ce /src/util | |
parent | e8520aa3dad18bc174ea37256c66932062838253 (diff) | |
download | gnunet-052607fbf75f85c555acb999fb4ecfbd1cfeb4c6.tar.gz gnunet-052607fbf75f85c555acb999fb4ecfbd1cfeb4c6.zip |
better debug messages
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/resolver_api.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index e99cab8de..f04db13c3 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c | |||
@@ -228,7 +228,8 @@ handle_address_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
228 | if (msg == NULL) | 228 | if (msg == NULL) |
229 | { | 229 | { |
230 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 230 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
231 | _("Timeout trying to resolve hostname.\n")); | 231 | _("Timeout trying to resolve hostname `%s'.\n"), |
232 | rh->hostname); | ||
232 | rh->addr_callback (rh->cls, NULL, 0); | 233 | rh->addr_callback (rh->cls, NULL, 0); |
233 | GNUNET_CLIENT_disconnect (rh->client); | 234 | GNUNET_CLIENT_disconnect (rh->client); |
234 | GNUNET_free (rh); | 235 | GNUNET_free (rh); |
@@ -248,7 +249,8 @@ handle_address_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
248 | { | 249 | { |
249 | #if DEBUG_RESOLVER | 250 | #if DEBUG_RESOLVER |
250 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
251 | _("Received end message resolving hostname.\n")); | 252 | _("Received end message resolving hostname `%s'.\n"), |
253 | rh->hostname); | ||
252 | #endif | 254 | #endif |
253 | rh->addr_callback (rh->cls, NULL, 0); | 255 | rh->addr_callback (rh->cls, NULL, 0); |
254 | GNUNET_CLIENT_disconnect (rh->client); | 256 | GNUNET_CLIENT_disconnect (rh->client); |
@@ -268,7 +270,9 @@ handle_address_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
268 | #if DEBUG_RESOLVER | 270 | #if DEBUG_RESOLVER |
269 | { | 271 | { |
270 | char *ips = no_resolve (sa, salen); | 272 | char *ips = no_resolve (sa, salen); |
271 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Resolver returns `%s'.\n", ips); | 273 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
274 | "Resolver returns `%s' for `%s'.\n", ips, | ||
275 | rh->hostname); | ||
272 | GNUNET_free (ips); | 276 | GNUNET_free (ips); |
273 | } | 277 | } |
274 | #endif | 278 | #endif |
@@ -507,7 +511,8 @@ handle_hostname_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
507 | if (msg == NULL) | 511 | if (msg == NULL) |
508 | { | 512 | { |
509 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 513 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
510 | _("Timeout trying to resolve IP address.\n")); | 514 | _("Timeout trying to resolve IP address `%s'.\n"), |
515 | GNUNET_a2s ((const void*) &rh[1], rh->salen)); | ||
511 | rh->name_callback (rh->cls, NULL); | 516 | rh->name_callback (rh->cls, NULL); |
512 | GNUNET_CLIENT_disconnect (rh->client); | 517 | GNUNET_CLIENT_disconnect (rh->client); |
513 | GNUNET_free (rh); | 518 | GNUNET_free (rh); |
@@ -518,7 +523,8 @@ handle_hostname_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
518 | { | 523 | { |
519 | #if DEBUG_RESOLVER | 524 | #if DEBUG_RESOLVER |
520 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 525 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
521 | _("Received end message resolving IP address.\n")); | 526 | _("Received end message resolving IP address `%s'.\n"), |
527 | GNUNET_a2s ((const void*) &rh[1], rh->salen)); | ||
522 | #endif | 528 | #endif |
523 | rh->name_callback (rh->cls, NULL); | 529 | rh->name_callback (rh->cls, NULL); |
524 | GNUNET_CLIENT_disconnect (rh->client); | 530 | GNUNET_CLIENT_disconnect (rh->client); |
@@ -536,7 +542,9 @@ handle_hostname_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
536 | } | 542 | } |
537 | #if DEBUG_RESOLVER | 543 | #if DEBUG_RESOLVER |
538 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 544 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
539 | _("Resolver returns `%s'.\n"), hostname); | 545 | _("Resolver returns `%s' for IP `%s'.\n"), |
546 | hostname, | ||
547 | GNUNET_a2s ((const void*) &rh[1], rh->salen)); | ||
540 | #endif | 548 | #endif |
541 | rh->name_callback (rh->cls, hostname); | 549 | rh->name_callback (rh->cls, hostname); |
542 | GNUNET_CLIENT_receive (rh->client, | 550 | GNUNET_CLIENT_receive (rh->client, |