From 30b63fcc6c9ab16a15f2f9640f8991e2893d9cef Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 12 Feb 2015 19:19:11 +0000 Subject: -fix shutdown issue --- src/transport/gnunet-service-transport_hello.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index 7ed5c1e04..00df3d00c 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c @@ -203,16 +203,19 @@ refresh_hello_task (void *cls, /** - * Schedule task to refresh hello (unless such a - * task exists already). + * Schedule task to refresh hello (but only if such a + * task exists already, as otherwise the module might + * have been shutdown). */ static void refresh_hello () { if (NULL != hello_task) + { GNUNET_SCHEDULER_cancel (hello_task); - hello_task = GNUNET_SCHEDULER_add_now (&refresh_hello_task, - NULL); + hello_task = GNUNET_SCHEDULER_add_now (&refresh_hello_task, + NULL); + } } -- cgit v1.2.3