diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-04 09:12:12 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-04 09:12:12 +0000 |
commit | 90e1bc31214319a78036c591228af5d0e23a71af (patch) | |
tree | fe84c9706c85f9be89102d3f855ee631507851ef /src/dht/test_dht_multipeer.c | |
parent | 72a6244f883dddeefe12d006a57ebea72986b255 (diff) | |
download | gnunet-90e1bc31214319a78036c591228af5d0e23a71af.tar.gz gnunet-90e1bc31214319a78036c591228af5d0e23a71af.zip |
factor out stop into new task (in preparation)
Diffstat (limited to 'src/dht/test_dht_multipeer.c')
-rw-r--r-- | src/dht/test_dht_multipeer.c | 13 |
1 files 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) | |||
228 | } | 228 | } |
229 | } | 229 | } |
230 | 230 | ||
231 | static void | ||
232 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
233 | { | ||
234 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | ||
235 | pg = NULL; | ||
236 | } | ||
237 | |||
231 | 238 | ||
232 | /** | 239 | /** |
233 | * Function scheduled to be run on the successful completion of this | 240 | * 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) | |||
265 | test_get); | 272 | test_get); |
266 | GNUNET_free (test_get); | 273 | GNUNET_free (test_get); |
267 | } | 274 | } |
268 | 275 | ok = 0; | |
269 | ok = 0; | 276 | GNUNET_SCHEDULER_add_now (&do_stop, NULL); |
270 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | ||
271 | pg = NULL; | ||
272 | } | 277 | } |
273 | 278 | ||
274 | 279 | ||