From b22cba40c901db029b90ba815dfb5b09fe5d38a2 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Wed, 9 Mar 2011 10:50:05 +0000 Subject: cleanup testing_group.c, fix bad shutdown in test_testing testcase --- src/testing/test_testing.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/testing/test_testing.c') diff --git a/src/testing/test_testing.c b/src/testing/test_testing.c index 880ecb399..30ad9b13d 100644 --- a/src/testing/test_testing.c +++ b/src/testing/test_testing.c @@ -48,6 +48,17 @@ end_cb (void *cls, const char *emsg) } } + + +void do_shutdown (void *cls, + const struct GNUNET_SCHEDULER_TaskContext * tc) +{ + struct GNUNET_TESTING_Daemon *d = cls; + GNUNET_TESTING_daemon_stop (d, TIMEOUT, &end_cb, NULL, GNUNET_YES, + GNUNET_NO); +} + + static void my_cb (void *cls, const struct GNUNET_PeerIdentity *id, @@ -59,8 +70,7 @@ my_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started, will now stop it.\n", GNUNET_i2s (id)); #endif - GNUNET_TESTING_daemon_stop (d, TIMEOUT, &end_cb, NULL, GNUNET_YES, - GNUNET_NO); + GNUNET_SCHEDULER_add_now(&do_shutdown, d); } -- cgit v1.2.3