diff options
Diffstat (limited to 'src/testing/test_testing.c')
-rw-r--r-- | src/testing/test_testing.c | 14 |
1 files changed, 12 insertions, 2 deletions
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) | |||
48 | } | 48 | } |
49 | } | 49 | } |
50 | 50 | ||
51 | |||
52 | |||
53 | void do_shutdown (void *cls, | ||
54 | const struct GNUNET_SCHEDULER_TaskContext * tc) | ||
55 | { | ||
56 | struct GNUNET_TESTING_Daemon *d = cls; | ||
57 | GNUNET_TESTING_daemon_stop (d, TIMEOUT, &end_cb, NULL, GNUNET_YES, | ||
58 | GNUNET_NO); | ||
59 | } | ||
60 | |||
61 | |||
51 | static void | 62 | static void |
52 | my_cb (void *cls, | 63 | my_cb (void *cls, |
53 | const struct GNUNET_PeerIdentity *id, | 64 | const struct GNUNET_PeerIdentity *id, |
@@ -59,8 +70,7 @@ my_cb (void *cls, | |||
59 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 70 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
60 | "Daemon `%s' started, will now stop it.\n", GNUNET_i2s (id)); | 71 | "Daemon `%s' started, will now stop it.\n", GNUNET_i2s (id)); |
61 | #endif | 72 | #endif |
62 | GNUNET_TESTING_daemon_stop (d, TIMEOUT, &end_cb, NULL, GNUNET_YES, | 73 | GNUNET_SCHEDULER_add_now(&do_shutdown, d); |
63 | GNUNET_NO); | ||
64 | } | 74 | } |
65 | 75 | ||
66 | 76 | ||