From cbe386a2c1af69b88eba1be7240a2f19e014fd7c Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Thu, 31 May 2012 15:30:36 +0000 Subject: [PATCH] -fix --- src/gns/gnunet-service-gns.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index bf77cfa6c..5e2280111 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c @@ -190,7 +190,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down!"); /* Kill zone task for it may make the scheduler hang */ - if (zone_update_taskid) + if (zone_update_taskid != GNUNET_SCHEDULER_NO_TASK) GNUNET_SCHEDULER_cancel(zone_update_taskid); GNUNET_SERVER_notification_context_destroy (nc); @@ -211,6 +211,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) static void update_zone_dht_next(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { + zone_update_taskid = GNUNET_SCHEDULER_NO_TASK; GNUNET_NAMESTORE_zone_iterator_next(namestore_iter); } @@ -385,6 +386,8 @@ update_zone_dht_start(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { unsigned long long interval = 0; + zone_update_taskid = GNUNET_SCHEDULER_NO_TASK; + GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Scheduling DHT zone update!\n"); if (0 == num_public_records) { -- 2.25.1