diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-03-12 13:29:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-03-12 13:29:05 +0000 |
commit | a6f43190ab793b3487da2133735e166e337000c4 (patch) | |
tree | fc2dacc6a36f3ec04cf86a14cdea9c5bdf45274f /src/util/resolver_api.c | |
parent | 61cfd3340e67672f351ab92dab7da72dca058c79 (diff) | |
download | gnunet-a6f43190ab793b3487da2133735e166e337000c4.tar.gz gnunet-a6f43190ab793b3487da2133735e166e337000c4.zip |
cancel pending write if we are just dead anyway
Diffstat (limited to 'src/util/resolver_api.c')
-rw-r--r-- | src/util/resolver_api.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index f04db13c3..ecd3789f4 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c | |||
@@ -231,7 +231,7 @@ handle_address_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
231 | _("Timeout trying to resolve hostname `%s'.\n"), | 231 | _("Timeout trying to resolve hostname `%s'.\n"), |
232 | rh->hostname); | 232 | rh->hostname); |
233 | rh->addr_callback (rh->cls, NULL, 0); | 233 | rh->addr_callback (rh->cls, NULL, 0); |
234 | GNUNET_CLIENT_disconnect (rh->client); | 234 | GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO); |
235 | GNUNET_free (rh); | 235 | GNUNET_free (rh); |
236 | return; | 236 | return; |
237 | } | 237 | } |
@@ -239,7 +239,7 @@ handle_address_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
239 | { | 239 | { |
240 | GNUNET_break (0); | 240 | GNUNET_break (0); |
241 | rh->addr_callback (rh->cls, NULL, 0); | 241 | rh->addr_callback (rh->cls, NULL, 0); |
242 | GNUNET_CLIENT_disconnect (rh->client); | 242 | GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO); |
243 | GNUNET_free (rh); | 243 | GNUNET_free (rh); |
244 | return; | 244 | return; |
245 | } | 245 | } |
@@ -253,7 +253,7 @@ handle_address_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
253 | rh->hostname); | 253 | rh->hostname); |
254 | #endif | 254 | #endif |
255 | rh->addr_callback (rh->cls, NULL, 0); | 255 | rh->addr_callback (rh->cls, NULL, 0); |
256 | GNUNET_CLIENT_disconnect (rh->client); | 256 | GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO); |
257 | GNUNET_free (rh); | 257 | GNUNET_free (rh); |
258 | return; | 258 | return; |
259 | } | 259 | } |
@@ -263,7 +263,7 @@ handle_address_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
263 | { | 263 | { |
264 | GNUNET_break (0); | 264 | GNUNET_break (0); |
265 | rh->addr_callback (rh->cls, NULL, 0); | 265 | rh->addr_callback (rh->cls, NULL, 0); |
266 | GNUNET_CLIENT_disconnect (rh->client); | 266 | GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO); |
267 | GNUNET_free (rh); | 267 | GNUNET_free (rh); |
268 | return; | 268 | return; |
269 | } | 269 | } |
@@ -488,7 +488,7 @@ GNUNET_RESOLVER_ip_get (struct GNUNET_SCHEDULER_Handle *sched, | |||
488 | &handle_address_response, rh)) | 488 | &handle_address_response, rh)) |
489 | { | 489 | { |
490 | GNUNET_free (rh); | 490 | GNUNET_free (rh); |
491 | GNUNET_CLIENT_disconnect (client); | 491 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); |
492 | return NULL; | 492 | return NULL; |
493 | } | 493 | } |
494 | return rh; | 494 | return rh; |
@@ -514,7 +514,7 @@ handle_hostname_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
514 | _("Timeout trying to resolve IP address `%s'.\n"), | 514 | _("Timeout trying to resolve IP address `%s'.\n"), |
515 | GNUNET_a2s ((const void*) &rh[1], rh->salen)); | 515 | GNUNET_a2s ((const void*) &rh[1], rh->salen)); |
516 | rh->name_callback (rh->cls, NULL); | 516 | rh->name_callback (rh->cls, NULL); |
517 | GNUNET_CLIENT_disconnect (rh->client); | 517 | GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO); |
518 | GNUNET_free (rh); | 518 | GNUNET_free (rh); |
519 | return; | 519 | return; |
520 | } | 520 | } |
@@ -527,7 +527,7 @@ handle_hostname_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
527 | GNUNET_a2s ((const void*) &rh[1], rh->salen)); | 527 | GNUNET_a2s ((const void*) &rh[1], rh->salen)); |
528 | #endif | 528 | #endif |
529 | rh->name_callback (rh->cls, NULL); | 529 | rh->name_callback (rh->cls, NULL); |
530 | GNUNET_CLIENT_disconnect (rh->client); | 530 | GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO); |
531 | GNUNET_free (rh); | 531 | GNUNET_free (rh); |
532 | return; | 532 | return; |
533 | } | 533 | } |
@@ -536,7 +536,7 @@ handle_hostname_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
536 | { | 536 | { |
537 | GNUNET_break (0); | 537 | GNUNET_break (0); |
538 | rh->name_callback (rh->cls, NULL); | 538 | rh->name_callback (rh->cls, NULL); |
539 | GNUNET_CLIENT_disconnect (rh->client); | 539 | GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO); |
540 | GNUNET_free (rh); | 540 | GNUNET_free (rh); |
541 | return; | 541 | return; |
542 | } | 542 | } |
@@ -659,7 +659,7 @@ GNUNET_RESOLVER_hostname_get (struct GNUNET_SCHEDULER_Handle *sched, | |||
659 | GNUNET_YES, | 659 | GNUNET_YES, |
660 | &handle_hostname_response, rh)) | 660 | &handle_hostname_response, rh)) |
661 | { | 661 | { |
662 | GNUNET_CLIENT_disconnect (client); | 662 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); |
663 | GNUNET_free (rh); | 663 | GNUNET_free (rh); |
664 | return NULL; | 664 | return NULL; |
665 | } | 665 | } |
@@ -717,7 +717,7 @@ void | |||
717 | GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *h) | 717 | GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *h) |
718 | { | 718 | { |
719 | if (h->client != NULL) | 719 | if (h->client != NULL) |
720 | GNUNET_CLIENT_disconnect (h->client); | 720 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); |
721 | if (h->task != GNUNET_SCHEDULER_NO_TASK) | 721 | if (h->task != GNUNET_SCHEDULER_NO_TASK) |
722 | GNUNET_SCHEDULER_cancel (h->sched, h->task); | 722 | GNUNET_SCHEDULER_cancel (h->sched, h->task); |
723 | GNUNET_free (h); | 723 | GNUNET_free (h); |