diff options
Diffstat (limited to 'src/testing/testing_group.c')
-rw-r--r-- | src/testing/testing_group.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index f22bb2bff..26aac5e7c 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c | |||
@@ -5554,7 +5554,7 @@ internal_startup_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
5554 | * Calls GNUNET_TESTING_daemon_continue_startup to set the daemon's state | 5554 | * Calls GNUNET_TESTING_daemon_continue_startup to set the daemon's state |
5555 | * from HOSTKEY_CREATED to TOPOLOGY_SETUP. Makes sure not to saturate a host | 5555 | * from HOSTKEY_CREATED to TOPOLOGY_SETUP. Makes sure not to saturate a host |
5556 | * with requests delaying them when needed. | 5556 | * with requests delaying them when needed. |
5557 | * | 5557 | * |
5558 | * @param cls closure: internal context of the daemon. | 5558 | * @param cls closure: internal context of the daemon. |
5559 | * @param tc TaskContext | 5559 | * @param tc TaskContext |
5560 | */ | 5560 | */ |
@@ -5563,6 +5563,7 @@ internal_continue_startup (void *cls, | |||
5563 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 5563 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
5564 | { | 5564 | { |
5565 | struct InternalStartContext *internal_context = cls; | 5565 | struct InternalStartContext *internal_context = cls; |
5566 | |||
5566 | internal_context->peer->startup_task = GNUNET_SCHEDULER_NO_TASK; | 5567 | internal_context->peer->startup_task = GNUNET_SCHEDULER_NO_TASK; |
5567 | 5568 | ||
5568 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 5569 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
@@ -5586,9 +5587,11 @@ internal_continue_startup (void *cls, | |||
5586 | } | 5587 | } |
5587 | else | 5588 | else |
5588 | { | 5589 | { |
5589 | internal_context->peer->startup_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 5590 | internal_context->peer->startup_task = |
5590 | (GNUNET_TIME_UNIT_MILLISECONDS, 100), | 5591 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
5591 | &internal_continue_startup, internal_context); | 5592 | (GNUNET_TIME_UNIT_MILLISECONDS, 100), |
5593 | &internal_continue_startup, | ||
5594 | internal_context); | ||
5592 | } | 5595 | } |
5593 | } | 5596 | } |
5594 | 5597 | ||
@@ -5894,16 +5897,18 @@ GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg) | |||
5894 | pg->starting = 0; | 5897 | pg->starting = 0; |
5895 | for (i = 0; i < pg->total; i++) | 5898 | for (i = 0; i < pg->total; i++) |
5896 | { | 5899 | { |
5897 | pg->peers[i].startup_task = GNUNET_SCHEDULER_add_now (&internal_continue_startup, | 5900 | pg->peers[i].startup_task = |
5898 | &pg->peers[i].internal_context); | 5901 | GNUNET_SCHEDULER_add_now (&internal_continue_startup, |
5902 | &pg->peers[i].internal_context); | ||
5899 | } | 5903 | } |
5900 | } | 5904 | } |
5901 | #else | 5905 | #else |
5902 | pg->starting = 0; | 5906 | pg->starting = 0; |
5903 | for (i = 0; i < pg->total; i++) | 5907 | for (i = 0; i < pg->total; i++) |
5904 | { | 5908 | { |
5905 | pg->peers[i].startup_task = GNUNET_SCHEDULER_add_now (&internal_continue_startup, | 5909 | pg->peers[i].startup_task = |
5906 | &pg->peers[i].internal_context); | 5910 | GNUNET_SCHEDULER_add_now (&internal_continue_startup, |
5911 | &pg->peers[i].internal_context); | ||
5907 | } | 5912 | } |
5908 | #endif | 5913 | #endif |
5909 | } | 5914 | } |