aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/test_testing.c')
-rw-r--r--src/testing/test_testing.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/testing/test_testing.c b/src/testing/test_testing.c
index 7045ee6b1..88861a156 100644
--- a/src/testing/test_testing.c
+++ b/src/testing/test_testing.c
@@ -34,28 +34,27 @@ static void
34end_cb (void *cls, const char *emsg) 34end_cb (void *cls, const char *emsg)
35{ 35{
36 if (emsg != NULL) 36 if (emsg != NULL)
37 { 37 {
38 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Ending with error: %s\n", emsg); 38 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Ending with error: %s\n", emsg);
39 ok = 1; 39 ok = 1;
40 } 40 }
41 else 41 else
42 { 42 {
43#if VERBOSE 43#if VERBOSE
44 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 44 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon terminated, will now exit.\n");
45 "Daemon terminated, will now exit.\n");
46#endif 45#endif
47 ok = 0; 46 ok = 0;
48 } 47 }
49} 48}
50 49
51 50
52 51
53void do_shutdown (void *cls, 52void
54 const struct GNUNET_SCHEDULER_TaskContext * tc) 53do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
55{ 54{
56 struct GNUNET_TESTING_Daemon *d = cls; 55 struct GNUNET_TESTING_Daemon *d = cls;
57 GNUNET_TESTING_daemon_stop (d, TIMEOUT, &end_cb, NULL, GNUNET_YES, 56
58 GNUNET_NO); 57 GNUNET_TESTING_daemon_stop (d, TIMEOUT, &end_cb, NULL, GNUNET_YES, GNUNET_NO);
59} 58}
60 59
61 60
@@ -70,7 +69,7 @@ my_cb (void *cls,
70 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 69 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
71 "Daemon `%s' started, will now stop it.\n", GNUNET_i2s (id)); 70 "Daemon `%s' started, will now stop it.\n", GNUNET_i2s (id));
72#endif 71#endif
73 GNUNET_SCHEDULER_add_now(&do_shutdown, d); 72 GNUNET_SCHEDULER_add_now (&do_shutdown, d);
74} 73}
75 74
76 75
@@ -85,9 +84,8 @@ run (void *cls,
85#if VERBOSE 84#if VERBOSE
86 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemon.\n"); 85 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemon.\n");
87#endif 86#endif
88 d = 87 d = GNUNET_TESTING_daemon_start (cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0, NULL,
89 GNUNET_TESTING_daemon_start (cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0, NULL, NULL, NULL, 88 NULL, NULL, &my_cb, NULL);
90 &my_cb, NULL);
91 GNUNET_assert (d != NULL); 89 GNUNET_assert (d != NULL);
92} 90}
93 91