aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-04-19 17:10:46 +0000
committerChristian Grothoff <christian@grothoff.org>2012-04-19 17:10:46 +0000
commit8e0637f1a72107a8ac1d312ce084644ee27d7981 (patch)
tree0bdf694f407a986b291f55bbd55921b8b80f8f4e /src/statistics
parent63feadfacea651a849a8d859bde336697e14d0d3 (diff)
downloadgnunet-8e0637f1a72107a8ac1d312ce084644ee27d7981.tar.gz
gnunet-8e0637f1a72107a8ac1d312ce084644ee27d7981.zip
-fix
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/statistics_api.c13
1 files changed, 12 insertions, 1 deletions
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)
932} 932}
933 933
934 934
935static void
936destroy_task (void *cls,
937 const struct GNUNET_SCHEDULER_TaskContext *tc)
938{
939 struct GNUNET_STATISTICS_Handle *h = cls;
940
941 GNUNET_STATISTICS_destroy (h, GNUNET_YES);
942}
943
944
935/** 945/**
936 * Schedule the next action to be performed. 946 * Schedule the next action to be performed.
937 * 947 *
@@ -959,7 +969,8 @@ schedule_action (struct GNUNET_STATISTICS_Handle *h)
959 if (h->do_destroy) 969 if (h->do_destroy)
960 { 970 {
961 h->do_destroy = GNUNET_NO; 971 h->do_destroy = GNUNET_NO;
962 GNUNET_STATISTICS_destroy (h, GNUNET_YES); 972 GNUNET_SCHEDULER_add_continuation (&destroy_task, h,
973 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
963 } 974 }
964 return; 975 return;
965 } 976 }