From 90e1bc31214319a78036c591228af5d0e23a71af Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 4 Oct 2011 09:12:12 +0000 Subject: [PATCH] factor out stop into new task (in preparation) --- src/dht/test_dht_multipeer.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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); } -- 2.25.1