aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/statistics_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-04-19 19:06:15 +0000
committerChristian Grothoff <christian@grothoff.org>2012-04-19 19:06:15 +0000
commit97fc3fe639bbe502e572697436b0879a18bba463 (patch)
tree36a76b217b9c9eb585221b1394d7942014584055 /src/statistics/statistics_api.c
parent88bf2770df46cdb1039818c1e52c25e106f0f5e9 (diff)
downloadgnunet-97fc3fe639bbe502e572697436b0879a18bba463.tar.gz
gnunet-97fc3fe639bbe502e572697436b0879a18bba463.zip
-fix
Diffstat (limited to 'src/statistics/statistics_api.c')
-rw-r--r--src/statistics/statistics_api.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c
index d73649b7e..db1efb1ab 100644
--- a/src/statistics/statistics_api.c
+++ b/src/statistics/statistics_api.c
@@ -412,6 +412,22 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
412} 412}
413 413
414 414
415
416/**
417 * Task used by 'reconnect_later' to shutdown the handle
418 *
419 * @param cls the statistics handle
420 * @param tc scheduler context
421 */
422static void
423do_destroy (void *cls,
424 const struct GNUNET_SCHEDULER_TaskContext *tc)
425{
426 struct GNUNET_STATISTICS_Handle *h = cls;
427
428 GNUNET_STATISTICS_destroy (h, GNUNET_NO);
429}
430
415/** 431/**
416 * Reconnect at a later time, respecting back-off. 432 * Reconnect at a later time, respecting back-off.
417 * 433 *
@@ -430,7 +446,8 @@ reconnect_later (struct GNUNET_STATISTICS_Handle *h)
430 */ 446 */
431 GNUNET_break (0); 447 GNUNET_break (0);
432 h->do_destroy = GNUNET_NO; 448 h->do_destroy = GNUNET_NO;
433 GNUNET_STATISTICS_destroy (h, GNUNET_NO); 449 GNUNET_SCHEDULER_add_continuation (&do_destroy, h,
450 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
434 return; 451 return;
435 } 452 }
436 h->backoff_task = 453 h->backoff_task =