diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-30 08:17:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-30 08:17:37 +0000 |
commit | 95f9076a2139f5fb042b944a0658b6cda2fa35db (patch) | |
tree | b0826a2a1dcf812e6b4450fe6b05d47cd53ae49d /src/topology | |
parent | 7746f68db77b9ca3c4aaca24ab2ce5253461240b (diff) |
implementing new scheduler shutdown semantics
Diffstat (limited to 'src/topology')
-rw-r--r-- | src/topology/gnunet-daemon-topology.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 1a6c163eea..eddac8c8ad 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c @@ -514,13 +514,9 @@ schedule_next_hello (void *cls) struct FindAdvHelloContext fah; size_t next_want; struct GNUNET_TIME_Relative delay; - const struct GNUNET_SCHEDULER_TaskContext *tc; pl->hello_delay_task = NULL; GNUNET_assert (GNUNET_YES == pl->is_connected); - tc = GNUNET_SCHEDULER_get_task_context (); - if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) - return; /* we're out of here */ if (pl->hello_req != NULL) return; /* did not finish sending the previous one */ /* find applicable HELLOs */ @@ -535,7 +531,7 @@ schedule_next_hello (void *cls) GNUNET_SCHEDULER_add_delayed (fah.next_adv, &schedule_next_hello, pl); - if (fah.result == NULL) + if (NULL == fah.result) return; next_want = GNUNET_HELLO_size (fah.result->hello); delay = GNUNET_TIME_absolute_get_remaining (pl->next_hello_allowed); @@ -1241,9 +1237,8 @@ run (void *cls, NULL, GNUNET_NO, NULL, GNUNET_NO, handlers); - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, - &cleaning_task, - NULL); + GNUNET_SCHEDULER_add_shutdown (&cleaning_task, + NULL); if (NULL == transport) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |