diff options
Diffstat (limited to 'src/testbed/testbed_api_testbed.c')
-rw-r--r-- | src/testbed/testbed_api_testbed.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index fb9ed31b6..f9b67676e 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_testbed_service.h" | 29 | #include "gnunet_testbed_service.h" |
30 | #include "testbed_api_peers.h" | ||
30 | 31 | ||
31 | /** | 32 | /** |
32 | * Generic loggins shorthand | 33 | * Generic loggins shorthand |
@@ -500,13 +501,19 @@ shutdown_run_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
500 | rc->peer_count = 0; | 501 | rc->peer_count = 0; |
501 | for (peer = 0; peer < rc->num_peers; peer++) | 502 | for (peer = 0; peer < rc->num_peers; peer++) |
502 | { | 503 | { |
504 | if (PS_STARTED != rc->peers[peer]->state) | ||
505 | { | ||
506 | rc->peer_count++; | ||
507 | continue; | ||
508 | } | ||
503 | dll_op = GNUNET_malloc (sizeof (struct DLLOperation)); | 509 | dll_op = GNUNET_malloc (sizeof (struct DLLOperation)); |
504 | dll_op->op = GNUNET_TESTBED_peer_stop (rc->peers[peer]); | 510 | dll_op->op = GNUNET_TESTBED_peer_stop (rc->peers[peer]); |
505 | dll_op->cls = rc->peers[peer]; | 511 | dll_op->cls = rc->peers[peer]; |
506 | GNUNET_CONTAINER_DLL_insert_tail (rc->dll_op_head, rc->dll_op_tail, | 512 | GNUNET_CONTAINER_DLL_insert_tail (rc->dll_op_head, rc->dll_op_tail, |
507 | dll_op); | 513 | dll_op); |
508 | } | 514 | } |
509 | return; | 515 | if (rc->peer_count != rc->num_peers) |
516 | return; | ||
510 | } | 517 | } |
511 | } | 518 | } |
512 | rc->state = RC_PEERS_DESTROYED; /* No peers are present so we consider the | 519 | rc->state = RC_PEERS_DESTROYED; /* No peers are present so we consider the |