diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-11-14 06:59:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-11-14 06:59:21 +0000 |
commit | b89b6b9bedb4fb6e2363a28da0789de76ed3d392 (patch) | |
tree | 068b591c9c5b8b42581a4dd3e5f1716e116f76ca /src/core/test_core_api_start_only.c | |
parent | 5f662c4f39ec7c1a0370f35b6a88c0d1bc866f75 (diff) | |
download | gnunet-b89b6b9bedb4fb6e2363a28da0789de76ed3d392.tar.gz gnunet-b89b6b9bedb4fb6e2363a28da0789de76ed3d392.zip |
fix
Diffstat (limited to 'src/core/test_core_api_start_only.c')
-rw-r--r-- | src/core/test_core_api_start_only.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index e03886e6e..bfe160edb 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c | |||
@@ -103,6 +103,19 @@ static struct GNUNET_CORE_MessageHandler handlers[] = { | |||
103 | }; | 103 | }; |
104 | 104 | ||
105 | 105 | ||
106 | static void | ||
107 | shutdown_task (void *cls, | ||
108 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
109 | { | ||
110 | GNUNET_CORE_disconnect (p1.ch); | ||
111 | p1.ch = NULL; | ||
112 | GNUNET_CORE_disconnect (p2.ch); | ||
113 | p2.ch = NULL; | ||
114 | ok = 0; | ||
115 | } | ||
116 | |||
117 | |||
118 | |||
106 | 119 | ||
107 | static void | 120 | static void |
108 | init_notify (void *cls, | 121 | init_notify (void *cls, |
@@ -130,10 +143,8 @@ init_notify (void *cls, | |||
130 | else | 143 | else |
131 | { | 144 | { |
132 | GNUNET_assert (cls == &p2); | 145 | GNUNET_assert (cls == &p2); |
133 | GNUNET_CORE_disconnect (p1.ch); | ||
134 | GNUNET_CORE_disconnect (p2.ch); | ||
135 | GNUNET_SCHEDULER_cancel (timeout_task_id); | 146 | GNUNET_SCHEDULER_cancel (timeout_task_id); |
136 | ok = 0; | 147 | GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
137 | } | 148 | } |
138 | } | 149 | } |
139 | 150 | ||