diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-11 13:21:43 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-11 13:21:43 +0000 |
commit | 6da582ab73a51dceb234e14cf365ff72eb82ced8 (patch) | |
tree | ef8633f93bcaac730ec31a54bf5166a3dfd02ba1 /src/testbed | |
parent | 58ccaaf99f2cb5402ed63a1252d51622bd018bf5 (diff) | |
download | gnunet-6da582ab73a51dceb234e14cf365ff72eb82ced8.tar.gz gnunet-6da582ab73a51dceb234e14cf365ff72eb82ced8.zip |
- fix
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/gnunet-service-testbed_oc.c | 3 | ||||
-rw-r--r-- | src/testbed/testbed_api_testbed.c | 21 |
2 files changed, 14 insertions, 10 deletions
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c index 1e4a9eb6b..4d573cb1a 100644 --- a/src/testbed/gnunet-service-testbed_oc.c +++ b/src/testbed/gnunet-service-testbed_oc.c | |||
@@ -1414,7 +1414,10 @@ rocc_hello_sent_cb (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1414 | return; | 1414 | return; |
1415 | } | 1415 | } |
1416 | if (GNUNET_SCHEDULER_REASON_READ_READY != tc->reason) | 1416 | if (GNUNET_SCHEDULER_REASON_READ_READY != tc->reason) |
1417 | { | ||
1418 | GNUNET_break (0); | ||
1417 | return; | 1419 | return; |
1420 | } | ||
1418 | rocc->tcc.task = GNUNET_SCHEDULER_add_now (&try_connect_task, &rocc->tcc); | 1421 | rocc->tcc.task = GNUNET_SCHEDULER_add_now (&try_connect_task, &rocc->tcc); |
1419 | } | 1422 | } |
1420 | 1423 | ||
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index c54ef3e19..caaa86e7a 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -375,7 +375,6 @@ static void | |||
375 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 375 | cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
376 | { | 376 | { |
377 | struct RunContext *rc = cls; | 377 | struct RunContext *rc = cls; |
378 | struct DLLOperation *dll_op; | ||
379 | unsigned int hid; | 378 | unsigned int hid; |
380 | 379 | ||
381 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == rc->register_hosts_task); | 380 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == rc->register_hosts_task); |
@@ -383,15 +382,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
383 | GNUNET_assert (NULL == rc->peers); | 382 | GNUNET_assert (NULL == rc->peers); |
384 | GNUNET_assert (NULL == rc->hc_handles); | 383 | GNUNET_assert (NULL == rc->hc_handles); |
385 | GNUNET_assert (RC_PEERS_SHUTDOWN == rc->state); | 384 | GNUNET_assert (RC_PEERS_SHUTDOWN == rc->state); |
386 | if (NULL != rc->dll_op_head) | 385 | GNUNET_assert (NULL == rc->dll_op_head); |
387 | { /* cancel our pending operations */ | ||
388 | while (NULL != (dll_op = rc->dll_op_head)) | ||
389 | { | ||
390 | GNUNET_TESTBED_operation_done (dll_op->op); | ||
391 | GNUNET_CONTAINER_DLL_remove (rc->dll_op_head, rc->dll_op_tail, dll_op); | ||
392 | GNUNET_free (dll_op); | ||
393 | } | ||
394 | } | ||
395 | if (NULL != rc->c) | 386 | if (NULL != rc->c) |
396 | GNUNET_TESTBED_controller_disconnect (rc->c); | 387 | GNUNET_TESTBED_controller_disconnect (rc->c); |
397 | if (NULL != rc->cproc) | 388 | if (NULL != rc->cproc) |
@@ -471,6 +462,16 @@ shutdown_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
471 | GNUNET_TESTBED_cancel_registration (rc->reg_handle); | 462 | GNUNET_TESTBED_cancel_registration (rc->reg_handle); |
472 | rc->reg_handle = NULL; | 463 | rc->reg_handle = NULL; |
473 | } | 464 | } |
465 | /* cancel any exiting operations */ | ||
466 | if (NULL != rc->dll_op_head) | ||
467 | { | ||
468 | while (NULL != (dll_op = rc->dll_op_head)) | ||
469 | { | ||
470 | GNUNET_TESTBED_operation_done (dll_op->op); | ||
471 | GNUNET_CONTAINER_DLL_remove (rc->dll_op_head, rc->dll_op_tail, dll_op); | ||
472 | GNUNET_free (dll_op); | ||
473 | } | ||
474 | } | ||
474 | if (NULL != rc->c) | 475 | if (NULL != rc->c) |
475 | { | 476 | { |
476 | if (NULL != rc->peers) | 477 | if (NULL != rc->peers) |