aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-11-08 21:38:47 +0000
committerBart Polot <bart@net.in.tum.de>2011-11-08 21:38:47 +0000
commita3f8ef5b89dc44fc3acfb8f081a502f3409e4224 (patch)
tree0014b9f588d33b00c47b22dfdab5f9187aadf905 /src
parent0799af8eedff5c9e42b00dc8bd7baee78baa61a7 (diff)
downloadgnunet-a3f8ef5b89dc44fc3acfb8f081a502f3409e4224.tar.gz
gnunet-a3f8ef5b89dc44fc3acfb8f081a502f3409e4224.zip
Attempt to fix error on peergroup start on buildbots
Diffstat (limited to 'src')
-rw-r--r--src/testing/testing_peergroup.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c
index d3290a36c..f904269f9 100644
--- a/src/testing/testing_peergroup.c
+++ b/src/testing/testing_peergroup.c
@@ -33,7 +33,7 @@
33#include "gnunet_disk_lib.h" 33#include "gnunet_disk_lib.h"
34 34
35/** Globals **/ 35/** Globals **/
36#define DEFAULT_CONNECT_TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 30) 36#define DEFAULT_CONNECT_TIMEOUT 30 // FIXME: use fancy time
37 37
38#define DEFAULT_CONNECT_ATTEMPTS 2 38#define DEFAULT_CONNECT_ATTEMPTS 2
39 39
@@ -46,7 +46,17 @@ 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
50 /**
51 * Maximum attemps to connect two daemons.
52 */
49 unsigned long long connect_attempts; 53 unsigned long long connect_attempts;
54
55 /**
56 * How long to spend trying to establish all the connections?
57 */
58 unsigned long long connect_timeout; // FIXME: use fancy time
59
50 unsigned long long max_concurrent_ssh; 60 unsigned long long max_concurrent_ssh;
51 struct GNUNET_TIME_Absolute timeout; 61 struct GNUNET_TIME_Absolute timeout;
52 GNUNET_TESTING_NotifyConnection connect_cb; 62 GNUNET_TESTING_NotifyConnection connect_cb;
@@ -498,7 +508,10 @@ internal_peers_started_callback (void *cls,
498 pg_start_ctx->connect_topology, 508 pg_start_ctx->connect_topology,
499 pg_start_ctx->connect_topology_option, 509 pg_start_ctx->connect_topology_option,
500 pg_start_ctx->connect_topology_option_modifier, 510 pg_start_ctx->connect_topology_option_modifier,
501 DEFAULT_CONNECT_TIMEOUT, 511 // FIXME: use fancy time
512 GNUNET_TIME_relative_multiply(
513 GNUNET_TIME_UNIT_SECONDS,
514 pg_start_ctx->connect_timeout),
502 pg_start_ctx->connect_attempts, NULL, 515 pg_start_ctx->connect_attempts, NULL,
503 NULL); 516 NULL);
504 517
@@ -744,6 +757,13 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
744 } 757 }
745 758
746 if (GNUNET_OK != 759 if (GNUNET_OK !=
760 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "connect_timeout",
761 &pg_start_ctx->connect_timeout))
762 {
763 pg_start_ctx->connect_timeout = DEFAULT_CONNECT_TIMEOUT;
764 }
765
766 if (GNUNET_OK !=
747 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", 767 GNUNET_CONFIGURATION_get_value_number (cfg, "testing",
748 "max_outstanding_connections", 768 "max_outstanding_connections",
749 &pg_start_ctx->max_concurrent_connections)) 769 &pg_start_ctx->max_concurrent_connections))