From: Christian Grothoff Date: Thu, 19 Apr 2012 17:10:46 +0000 (+0000) Subject: -fix X-Git-Tag: initial-import-from-subversion-38251~13866 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8e0637f1a72107a8ac1d312ce084644ee27d7981;p=oweals%2Fgnunet.git -fix --- diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index f1a22c22a..d73649b7e 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -932,6 +932,16 @@ GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, int sync_first) } +static void +destroy_task (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + struct GNUNET_STATISTICS_Handle *h = cls; + + GNUNET_STATISTICS_destroy (h, GNUNET_YES); +} + + /** * Schedule the next action to be performed. * @@ -959,7 +969,8 @@ schedule_action (struct GNUNET_STATISTICS_Handle *h) if (h->do_destroy) { h->do_destroy = GNUNET_NO; - GNUNET_STATISTICS_destroy (h, GNUNET_YES); + GNUNET_SCHEDULER_add_continuation (&destroy_task, h, + GNUNET_SCHEDULER_REASON_PREREQ_DONE); } return; }