diff options
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r-- | src/testing/testing_api_loop.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c index ccee76898..82f6d0cab 100644 --- a/src/testing/testing_api_loop.c +++ b/src/testing/testing_api_loop.c | |||
@@ -204,7 +204,7 @@ run_finish_task_next (void *cls) | |||
204 | } | 204 | } |
205 | else | 205 | else |
206 | { | 206 | { |
207 | GNUNET_TESTING_interpreter_fail (is); | 207 | GNUNET_TESTING_interpreter_fail (); |
208 | } | 208 | } |
209 | 209 | ||
210 | } | 210 | } |
@@ -232,7 +232,7 @@ run_finish_task_sync (void *cls) | |||
232 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 232 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
233 | "The command with label %s did not finish its asynchronous task in time.\n", | 233 | "The command with label %s did not finish its asynchronous task in time.\n", |
234 | cmd->label); | 234 | cmd->label); |
235 | GNUNET_TESTING_interpreter_fail (is); | 235 | GNUNET_TESTING_interpreter_fail (); |
236 | } | 236 | } |
237 | 237 | ||
238 | if (GNUNET_YES == finished) | 238 | if (GNUNET_YES == finished) |
@@ -246,7 +246,7 @@ run_finish_task_sync (void *cls) | |||
246 | } | 246 | } |
247 | else | 247 | else |
248 | { | 248 | { |
249 | GNUNET_TESTING_interpreter_fail (is); | 249 | GNUNET_TESTING_interpreter_fail (); |
250 | } | 250 | } |
251 | } | 251 | } |
252 | 252 | ||
@@ -321,7 +321,7 @@ GNUNET_TESTING_cmd_make_unblocking (const struct GNUNET_TESTING_Command cmd) | |||
321 | * @param is interpreter of the test | 321 | * @param is interpreter of the test |
322 | */ | 322 | */ |
323 | void | 323 | void |
324 | GNUNET_TESTING_interpreter_fail (struct GNUNET_TESTING_Interpreter *is) | 324 | GNUNET_TESTING_interpreter_fail () |
325 | { | 325 | { |
326 | struct GNUNET_TESTING_Command *cmd = &is->commands[is->ip]; | 326 | struct GNUNET_TESTING_Command *cmd = &is->commands[is->ip]; |
327 | 327 | ||
@@ -411,9 +411,9 @@ interpreter_run (void *cls) | |||
411 | ftc = GNUNET_new (struct FinishTaskClosure); | 411 | ftc = GNUNET_new (struct FinishTaskClosure); |
412 | ftc->cmd = cmd; | 412 | ftc->cmd = cmd; |
413 | ftc->is = is; | 413 | ftc->is = is; |
414 | cmd->finish_task = GNUNET_SCHEDULER_add_delayed (CHECK_FINISHED_PERIOD, | 414 | is->finish_task = GNUNET_SCHEDULER_add_delayed (CHECK_FINISHED_PERIOD, |
415 | &run_finish_task_next, | 415 | &run_finish_task_next, |
416 | ftc); | 416 | ftc); |
417 | } | 417 | } |
418 | else | 418 | else |
419 | { | 419 | { |
@@ -448,11 +448,12 @@ do_shutdown (void *cls) | |||
448 | j++) { | 448 | j++) { |
449 | cmd->cleanup (cmd->cls, | 449 | cmd->cleanup (cmd->cls, |
450 | cmd); | 450 | cmd); |
451 | if (NULL != cmd->finish_task) | 451 | } |
452 | { | 452 | |
453 | GNUNET_SCHEDULER_cancel (cmd->finish_task); | 453 | if (NULL != is->finish_task) |
454 | cmd->finish_task = NULL; | 454 | { |
455 | } | 455 | GNUNET_SCHEDULER_cancel (is->finish_task); |
456 | cmd->finish_task = NULL; | ||
456 | } | 457 | } |
457 | 458 | ||
458 | if (NULL != is->task) | 459 | if (NULL != is->task) |