aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_plugin_transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_plugin_transport.c')
-rw-r--r--src/transport/test_plugin_transport.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index 83ff7f1c4..e9942cff9 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -89,12 +89,12 @@ struct GNUNET_HELPER_Handle *suid_helper;
89/** 89/**
90 * Timeout task 90 * Timeout task
91 */ 91 */
92static GNUNET_SCHEDULER_TaskIdentifier timeout_endbadly; 92static struct GNUNET_SCHEDULER_Task * timeout_endbadly;
93 93
94/** 94/**
95 * Timeout task 95 * Timeout task
96 */ 96 */
97static GNUNET_SCHEDULER_TaskIdentifier timeout_wait; 97static struct GNUNET_SCHEDULER_Task * timeout_wait;
98 98
99/** 99/**
100 * Library name 100 * Library name
@@ -138,10 +138,10 @@ end ()
138 int c = 0; 138 int c = 0;
139 ok = 0; 139 ok = 0;
140 140
141 if (GNUNET_SCHEDULER_NO_TASK != timeout_endbadly) 141 if (NULL != timeout_endbadly)
142 { 142 {
143 GNUNET_SCHEDULER_cancel (timeout_endbadly); 143 GNUNET_SCHEDULER_cancel (timeout_endbadly);
144 timeout_endbadly = GNUNET_SCHEDULER_NO_TASK; 144 timeout_endbadly = NULL;
145 } 145 }
146 if (NULL != api) 146 if (NULL != api)
147 GNUNET_PLUGIN_unload (libname, api); 147 GNUNET_PLUGIN_unload (libname, api);
@@ -183,11 +183,11 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
183 struct AddressWrapper *w; 183 struct AddressWrapper *w;
184 int c = 0; 184 int c = 0;
185 185
186 timeout_endbadly = GNUNET_SCHEDULER_NO_TASK; 186 timeout_endbadly = NULL;
187 if (GNUNET_SCHEDULER_NO_TASK != timeout_wait) 187 if (NULL != timeout_wait)
188 { 188 {
189 GNUNET_SCHEDULER_cancel (timeout_wait); 189 GNUNET_SCHEDULER_cancel (timeout_wait);
190 timeout_wait = GNUNET_SCHEDULER_NO_TASK; 190 timeout_wait = NULL;
191 } 191 }
192 192
193 if (pretty_printers_running > 0) 193 if (pretty_printers_running > 0)
@@ -249,7 +249,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
249static void 249static void
250wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 250wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
251{ 251{
252 timeout_wait = GNUNET_SCHEDULER_NO_TASK; 252 timeout_wait = NULL;
253 if (0 == addresses_reported) 253 if (0 == addresses_reported)
254 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, 254 GNUNET_log(GNUNET_ERROR_TYPE_WARNING,
255 "Plugin did not report any addresses, could not check address conversion functions\n"); 255 "Plugin did not report any addresses, could not check address conversion functions\n");
@@ -260,15 +260,15 @@ wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
260static void 260static void
261end_badly_now () 261end_badly_now ()
262{ 262{
263 if (GNUNET_SCHEDULER_NO_TASK != timeout_wait) 263 if (NULL != timeout_wait)
264 { 264 {
265 GNUNET_SCHEDULER_cancel (timeout_wait); 265 GNUNET_SCHEDULER_cancel (timeout_wait);
266 timeout_wait = GNUNET_SCHEDULER_NO_TASK; 266 timeout_wait = NULL;
267 } 267 }
268 if (GNUNET_SCHEDULER_NO_TASK != timeout_endbadly) 268 if (NULL != timeout_endbadly)
269 { 269 {
270 GNUNET_SCHEDULER_cancel (timeout_endbadly); 270 GNUNET_SCHEDULER_cancel (timeout_endbadly);
271 timeout_endbadly = GNUNET_SCHEDULER_NO_TASK; 271 timeout_endbadly = NULL;
272 } 272 }
273 timeout_endbadly = GNUNET_SCHEDULER_add_now (&end_badly, NULL ); 273 timeout_endbadly = GNUNET_SCHEDULER_add_now (&end_badly, NULL );
274} 274}
@@ -418,10 +418,10 @@ env_notify_address (void *cls,
418 end_badly_now (); 418 end_badly_now ();
419 return; 419 return;
420 } 420 }
421 if (GNUNET_SCHEDULER_NO_TASK != timeout_wait) 421 if (NULL != timeout_wait)
422 { 422 {
423 GNUNET_SCHEDULER_cancel (timeout_wait); 423 GNUNET_SCHEDULER_cancel (timeout_wait);
424 timeout_wait = GNUNET_SCHEDULER_NO_TASK; 424 timeout_wait = NULL;
425 } 425 }
426 426
427 timeout_wait = GNUNET_SCHEDULER_add_delayed (WAIT, &wait_end, NULL ); 427 timeout_wait = GNUNET_SCHEDULER_add_delayed (WAIT, &wait_end, NULL );