From: Christian Grothoff Date: Tue, 4 Oct 2011 09:12:12 +0000 (+0000) Subject: factor out stop into new task (in preparation) X-Git-Tag: initial-import-from-subversion-38251~16833 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=90e1bc31214319a78036c591228af5d0e23a71af;p=oweals%2Fgnunet.git factor out stop into new task (in preparation) --- diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c index 09554472a..8416577f0 100644 --- a/src/dht/test_dht_multipeer.c +++ b/src/dht/test_dht_multipeer.c @@ -228,6 +228,13 @@ shutdown_callback (void *cls, const char *emsg) } } +static void +do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); + pg = NULL; +} + /** * Function scheduled to be run on the successful completion of this @@ -265,10 +272,8 @@ finish_testing (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) test_get); GNUNET_free (test_get); } - - ok = 0; - GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); - pg = NULL; + ok = 0; + GNUNET_SCHEDULER_add_now (&do_stop, NULL); }