diff options
-rw-r--r-- | src/testing/testing_peergroup.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c index 1102218f0..470fdf8fa 100644 --- a/src/testing/testing_peergroup.c +++ b/src/testing/testing_peergroup.c | |||
@@ -559,10 +559,12 @@ internal_hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
559 | GNUNET_SCHEDULER_cancel (pg_start_ctx->die_task); | 559 | GNUNET_SCHEDULER_cancel (pg_start_ctx->die_task); |
560 | /* Set up task in case topology creation doesn't finish | 560 | /* Set up task in case topology creation doesn't finish |
561 | * within a reasonable amount of time */ | 561 | * within a reasonable amount of time */ |
562 | GNUNET_free_non_null (pg_start_ctx->fail_reason); | ||
563 | pg_start_ctx->fail_reason = GNUNET_strdup ("from create_topology"); | ||
562 | pg_start_ctx->die_task = | 564 | pg_start_ctx->die_task = |
563 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining | 565 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining |
564 | (pg_start_ctx->timeout), &end_badly, | 566 | (pg_start_ctx->timeout), &end_badly, |
565 | "from create_topology"); | 567 | pg_start_ctx); |
566 | pg_start_ctx->peers_left = pg_start_ctx->total; /* Reset counter */ | 568 | pg_start_ctx->peers_left = pg_start_ctx->total; /* Reset counter */ |
567 | create_expected_connections = | 569 | create_expected_connections = |
568 | GNUNET_TESTING_create_topology (pg_start_ctx->pg, | 570 | GNUNET_TESTING_create_topology (pg_start_ctx->pg, |
@@ -579,17 +581,22 @@ internal_hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
579 | else | 581 | else |
580 | { | 582 | { |
581 | GNUNET_SCHEDULER_cancel (pg_start_ctx->die_task); | 583 | GNUNET_SCHEDULER_cancel (pg_start_ctx->die_task); |
584 | GNUNET_free_non_null (pg_start_ctx->fail_reason); | ||
585 | pg_start_ctx->fail_reason = | ||
586 | GNUNET_strdup ("from create topology (bad return)"); | ||
582 | pg_start_ctx->die_task = | 587 | pg_start_ctx->die_task = |
583 | GNUNET_SCHEDULER_add_now (&end_badly, | 588 | GNUNET_SCHEDULER_add_now (&end_badly, pg_start_ctx); |
584 | "from create topology (bad return)"); | ||
585 | return; | 589 | return; |
586 | } | 590 | } |
587 | 591 | ||
588 | GNUNET_SCHEDULER_cancel (pg_start_ctx->die_task); | 592 | GNUNET_SCHEDULER_cancel (pg_start_ctx->die_task); |
593 | GNUNET_free_non_null (pg_start_ctx->fail_reason); | ||
594 | pg_start_ctx->fail_reason = | ||
595 | GNUNET_strdup ("from continue startup (timeout)"); | ||
589 | pg_start_ctx->die_task = | 596 | pg_start_ctx->die_task = |
590 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining | 597 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining |
591 | (pg_start_ctx->timeout), &end_badly, | 598 | (pg_start_ctx->timeout), &end_badly, |
592 | "from continue startup (timeout)"); | 599 | pg_start_ctx); |
593 | } | 600 | } |
594 | } | 601 | } |
595 | 602 | ||