diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-11 12:55:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-11 12:55:59 +0000 |
commit | 0dfaeac0da0947264a4e2409ee81a9f2f31f4fec (patch) | |
tree | bbf8627cfd07c877fb2b0a896b1016f46a5c62f6 /src/statistics | |
parent | c586b3ea0175e8bd96c6898698871d8eb27026fe (diff) | |
download | gnunet-0dfaeac0da0947264a4e2409ee81a9f2f31f4fec.tar.gz gnunet-0dfaeac0da0947264a4e2409ee81a9f2f31f4fec.zip |
-do disconnect after continuations, to hopefullyf ix #3194
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/statistics_api.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index cecc1b0f6..d99ad8aec 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -387,11 +387,6 @@ do_disconnect (struct GNUNET_STATISTICS_Handle *h) | |||
387 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); | 387 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); |
388 | h->th = NULL; | 388 | h->th = NULL; |
389 | } | 389 | } |
390 | if (NULL != h->client) | ||
391 | { | ||
392 | GNUNET_CLIENT_disconnect (h->client); | ||
393 | h->client = NULL; | ||
394 | } | ||
395 | h->receiving = GNUNET_NO; | 390 | h->receiving = GNUNET_NO; |
396 | if (NULL != (c = h->current)) | 391 | if (NULL != (c = h->current)) |
397 | { | 392 | { |
@@ -401,6 +396,11 @@ do_disconnect (struct GNUNET_STATISTICS_Handle *h) | |||
401 | c->cont (c->cls, GNUNET_SYSERR); | 396 | c->cont (c->cls, GNUNET_SYSERR); |
402 | free_action_item (c); | 397 | free_action_item (c); |
403 | } | 398 | } |
399 | if (NULL != h->client) | ||
400 | { | ||
401 | GNUNET_CLIENT_disconnect (h->client); | ||
402 | h->client = NULL; | ||
403 | } | ||
404 | } | 404 | } |
405 | 405 | ||
406 | 406 | ||
@@ -408,7 +408,7 @@ do_disconnect (struct GNUNET_STATISTICS_Handle *h) | |||
408 | * Try to (re)connect to the statistics service. | 408 | * Try to (re)connect to the statistics service. |
409 | * | 409 | * |
410 | * @param h statistics handle to reconnect | 410 | * @param h statistics handle to reconnect |
411 | * @return GNUNET_YES on success, GNUNET_NO on failure. | 411 | * @return #GNUNET_YES on success, #GNUNET_NO on failure. |
412 | */ | 412 | */ |
413 | static int | 413 | static int |
414 | try_connect (struct GNUNET_STATISTICS_Handle *h) | 414 | try_connect (struct GNUNET_STATISTICS_Handle *h) |
@@ -433,7 +433,7 @@ try_connect (struct GNUNET_STATISTICS_Handle *h) | |||
433 | GNUNET_CONTAINER_DLL_remove (h->action_head, | 433 | GNUNET_CONTAINER_DLL_remove (h->action_head, |
434 | h->action_tail, | 434 | h->action_tail, |
435 | gh); | 435 | gh); |
436 | free_action_item (gh); | 436 | free_action_item (gh); |
437 | } | 437 | } |
438 | } | 438 | } |
439 | for (i = 0; i < h->watches_size; i++) | 439 | for (i = 0; i < h->watches_size; i++) |
@@ -1266,7 +1266,7 @@ GNUNET_STATISTICS_watch_cancel (struct GNUNET_STATISTICS_Handle *handle, | |||
1266 | GNUNET_free (w); | 1266 | GNUNET_free (w); |
1267 | handle->watches[i] = NULL; | 1267 | handle->watches[i] = NULL; |
1268 | return GNUNET_OK; | 1268 | return GNUNET_OK; |
1269 | } | 1269 | } |
1270 | } | 1270 | } |
1271 | return GNUNET_SYSERR; | 1271 | return GNUNET_SYSERR; |
1272 | } | 1272 | } |