diff options
Diffstat (limited to 'src/testing/testing_peergroup.c')
-rw-r--r-- | src/testing/testing_peergroup.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c index aee9b8a50..1d9d3ba88 100644 --- a/src/testing/testing_peergroup.c +++ b/src/testing/testing_peergroup.c | |||
@@ -46,7 +46,7 @@ struct PeerGroupStartupContext | |||
46 | unsigned int total; | 46 | unsigned int total; |
47 | unsigned int peers_left; | 47 | unsigned int peers_left; |
48 | unsigned long long max_concurrent_connections; | 48 | unsigned long long max_concurrent_connections; |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * Maximum attemps to connect two daemons. | 51 | * Maximum attemps to connect two daemons. |
52 | */ | 52 | */ |
@@ -56,7 +56,7 @@ struct PeerGroupStartupContext | |||
56 | * How long to spend trying to establish all the connections? | 56 | * How long to spend trying to establish all the connections? |
57 | */ | 57 | */ |
58 | struct GNUNET_TIME_Relative connect_timeout; | 58 | struct GNUNET_TIME_Relative connect_timeout; |
59 | 59 | ||
60 | unsigned long long max_concurrent_ssh; | 60 | unsigned long long max_concurrent_ssh; |
61 | struct GNUNET_TIME_Absolute timeout; | 61 | struct GNUNET_TIME_Absolute timeout; |
62 | GNUNET_TESTING_NotifyConnection connect_cb; | 62 | GNUNET_TESTING_NotifyConnection connect_cb; |
@@ -508,7 +508,7 @@ internal_peers_started_callback (void *cls, | |||
508 | pg_start_ctx->connect_topology, | 508 | pg_start_ctx->connect_topology, |
509 | pg_start_ctx->connect_topology_option, | 509 | pg_start_ctx->connect_topology_option, |
510 | pg_start_ctx->connect_topology_option_modifier, | 510 | pg_start_ctx->connect_topology_option_modifier, |
511 | pg_start_ctx->connect_timeout, | 511 | pg_start_ctx->connect_timeout, |
512 | pg_start_ctx->connect_attempts, NULL, | 512 | pg_start_ctx->connect_attempts, NULL, |
513 | NULL); | 513 | NULL); |
514 | 514 | ||
@@ -755,9 +755,9 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
755 | 755 | ||
756 | if (GNUNET_OK != | 756 | if (GNUNET_OK != |
757 | GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT", | 757 | GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT", |
758 | &pg_start_ctx->connect_timeout)) | 758 | &pg_start_ctx->connect_timeout)) |
759 | { | 759 | { |
760 | pg_start_ctx->connect_timeout = DEFAULT_CONNECT_TIMEOUT; | 760 | pg_start_ctx->connect_timeout = DEFAULT_CONNECT_TIMEOUT; |
761 | } | 761 | } |
762 | 762 | ||
763 | if (GNUNET_OK != | 763 | if (GNUNET_OK != |
@@ -794,17 +794,15 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
794 | } | 794 | } |
795 | 795 | ||
796 | if (GNUNET_OK != | 796 | if (GNUNET_OK != |
797 | GNUNET_CONFIGURATION_get_value_time (cfg, "testing", | 797 | GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "PEERGROUP_TIMEOUT", |
798 | "PEERGROUP_TIMEOUT", | 798 | &rtimeout)) |
799 | &rtimeout)) | ||
800 | { | 799 | { |
801 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", | 800 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", |
802 | "testing", "PEERGROUP_TIMEOUT"); | 801 | "testing", "PEERGROUP_TIMEOUT"); |
803 | GNUNET_free (pg_start_ctx); | 802 | GNUNET_free (pg_start_ctx); |
804 | return NULL; | 803 | return NULL; |
805 | } | 804 | } |
806 | pg_start_ctx->timeout = | 805 | pg_start_ctx->timeout = GNUNET_TIME_relative_to_absolute (rtimeout); |
807 | GNUNET_TIME_relative_to_absolute (rtimeout); | ||
808 | 806 | ||
809 | 807 | ||
810 | /* Read topology related options from the configuration file */ | 808 | /* Read topology related options from the configuration file */ |