aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_large_topology.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-17 19:18:52 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-17 19:18:52 +0000
commit7dfd634b17df4e1505c62f2224380a0d38da2e8d (patch)
treedc8846d3455b9aa73f242ab79328bc943749de2c /src/testing/test_testing_large_topology.c
parent775613176d9e33ccdc8bcd468cfb9aab288458c2 (diff)
add units to time, use configuration time api where appropriate, fixing Mantis #1875
Diffstat (limited to 'src/testing/test_testing_large_topology.c')
-rw-r--r--src/testing/test_testing_large_topology.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c
index 78d91fa3d5..a271545075 100644
--- a/src/testing/test_testing_large_topology.c
+++ b/src/testing/test_testing_large_topology.c
@@ -1043,26 +1043,25 @@ run (void *cls, char *const *args, const char *cfgfile,
GNUNET_free_non_null (topology_str);
GNUNET_free_non_null (blacklist_topology_str);
- if (GNUNET_OK ==
- GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "settle_time",
- &temp_settle))
- settle_time =
- GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_settle);
-
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "SETTLE_TIME",
+ &settle_time))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
+ "testing", "SETTLE_TIME");
+ return;
+ }
if (GNUNET_SYSERR ==
GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "num_peers",
&num_peers))
num_peers = DEFAULT_NUM_PEERS;
- if (GNUNET_OK ==
- GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "connect_timeout",
- &temp_settle))
- connect_timeout =
- GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_settle);
- else
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "CONNECT_TIMEOUT",
+ &connect_timeout))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
- "testing", "connect_timeout");
+ "testing", "CONNECT_TIMEOUT");
return;
}