aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
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/mesh
parent775613176d9e33ccdc8bcd468cfb9aab288458c2 (diff)
downloadgnunet-7dfd634b17df4e1505c62f2224380a0d38da2e8d.tar.gz
gnunet-7dfd634b17df4e1505c62f2224380a0d38da2e8d.zip
add units to time, use configuration time api where appropriate, fixing Mantis #1875
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/test_mesh.conf2
-rw-r--r--src/mesh/test_mesh_2dtorus.conf4
-rw-r--r--src/mesh/test_mesh_path.conf2
-rw-r--r--src/mesh/test_mesh_small.c7
-rw-r--r--src/mesh/test_mesh_small.conf10
-rw-r--r--src/mesh/test_mesh_small_unicast_far.c7
6 files changed, 13 insertions, 19 deletions
diff --git a/src/mesh/test_mesh.conf b/src/mesh/test_mesh.conf
index b619591b8..bf4d4dfe7 100644
--- a/src/mesh/test_mesh.conf
+++ b/src/mesh/test_mesh.conf
@@ -47,7 +47,7 @@ PORT = 12366
47DEBUG = NO 47DEBUG = NO
48 48
49[transport-tcp] 49[transport-tcp]
50TIMEOUT = 300000 50TIMEOUT = 300 s
51PORT = 12368 51PORT = 12368
52 52
53[TESTING] 53[TESTING]
diff --git a/src/mesh/test_mesh_2dtorus.conf b/src/mesh/test_mesh_2dtorus.conf
index 35d69f02b..90ebd73af 100644
--- a/src/mesh/test_mesh_2dtorus.conf
+++ b/src/mesh/test_mesh_2dtorus.conf
@@ -69,13 +69,13 @@ CONNECT_TOPOLOGY = 2D_TORUS
69#PERCENTAGE = 3 69#PERCENTAGE = 3
70#PROBABILITY = .1 70#PROBABILITY = .1
71F2F = NO 71F2F = NO
72CONNECT_TIMEOUT = 600 72CONNECT_TIMEOUT = 600 s
73CONNECT_ATTEMPTS = 2 73CONNECT_ATTEMPTS = 2
74DEBUG = YES 74DEBUG = YES
75HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat 75HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
76MAX_CONCURRENT_SSH = 10 76MAX_CONCURRENT_SSH = 10
77USE_PROGRESSBARS = YES 77USE_PROGRESSBARS = YES
78PEERGROUP_TIMEOUT = 2400 78PEERGROUP_TIMEOUT = 2400 s
79TOPOLOGY_OUTPUT_FILE = mesh_topo_initial 79TOPOLOGY_OUTPUT_FILE = mesh_topo_initial
80MAX_OUTSTANDING_CONNECTIONS = 75 80MAX_OUTSTANDING_CONNECTIONS = 75
81#SINGLE_PEERINFO_PER_HOST = YES 81#SINGLE_PEERINFO_PER_HOST = YES
diff --git a/src/mesh/test_mesh_path.conf b/src/mesh/test_mesh_path.conf
index b619591b8..bf4d4dfe7 100644
--- a/src/mesh/test_mesh_path.conf
+++ b/src/mesh/test_mesh_path.conf
@@ -47,7 +47,7 @@ PORT = 12366
47DEBUG = NO 47DEBUG = NO
48 48
49[transport-tcp] 49[transport-tcp]
50TIMEOUT = 300000 50TIMEOUT = 300 s
51PORT = 12368 51PORT = 12368
52 52
53[TESTING] 53[TESTING]
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c
index 54c5eb45f..2757da47c 100644
--- a/src/mesh/test_mesh_small.c
+++ b/src/mesh/test_mesh_small.c
@@ -769,8 +769,8 @@ run (void *cls, char *const *args, const char *cfgfile,
769 mesh_peers = GNUNET_malloc (sizeof (uint16_t) * (num_peers + 1)); 769 mesh_peers = GNUNET_malloc (sizeof (uint16_t) * (num_peers + 1));
770 770
771 if (GNUNET_OK != 771 if (GNUNET_OK !=
772 GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small", 772 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "test_mesh_small",
773 "wait_time", &temp_wait)) 773 "WAIT_TIME", &wait_time))
774 { 774 {
775 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 775 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
776 "Option test_mesh_small:wait_time is required!\n"); 776 "Option test_mesh_small:wait_time is required!\n");
@@ -806,9 +806,6 @@ run (void *cls, char *const *args, const char *cfgfile,
806 } 806 }
807 } 807 }
808 808
809 wait_time =
810 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait);
811
812 if (GNUNET_YES == 809 if (GNUNET_YES ==
813 GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small", 810 GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small",
814 "output_file", &temp_str)) 811 "output_file", &temp_str))
diff --git a/src/mesh/test_mesh_small.conf b/src/mesh/test_mesh_small.conf
index ee5649498..20e13b863 100644
--- a/src/mesh/test_mesh_small.conf
+++ b/src/mesh/test_mesh_small.conf
@@ -40,8 +40,8 @@ INTERNAL_ADDRESS = 127.0.0.1
40EXTERNAL_ADDRESS = 127.0.0.1 40EXTERNAL_ADDRESS = 127.0.0.1
41 41
42[core] 42[core]
43TOTAL_QUOTA_IN = 999111999 43TOTAL_QUOTA_IN = 1 GB
44TOTAL_QUOTA_OUT = 999111999 44TOTAL_QUOTA_OUT = 1 GB
45AUTOSTART = YES 45AUTOSTART = YES
46PORT = 10003 46PORT = 10003
47 47
@@ -69,13 +69,13 @@ CONNECT_TOPOLOGY = 2D_TORUS
69#PERCENTAGE = 3 69#PERCENTAGE = 3
70#PROBABILITY = .1 70#PROBABILITY = .1
71F2F = NO 71F2F = NO
72CONNECT_TIMEOUT = 660 72CONNECT_TIMEOUT = 660 s
73CONNECT_ATTEMPTS = 2 73CONNECT_ATTEMPTS = 2
74DEBUG = YES 74DEBUG = YES
75HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat 75HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
76MAX_CONCURRENT_SSH = 10 76MAX_CONCURRENT_SSH = 10
77USE_PROGRESSBARS = YES 77USE_PROGRESSBARS = YES
78PEERGROUP_TIMEOUT = 2400 78PEERGROUP_TIMEOUT = 2400 s
79TOPOLOGY_OUTPUT_FILE = mesh_topo_initial 79TOPOLOGY_OUTPUT_FILE = mesh_topo_initial
80MAX_OUTSTANDING_CONNECTIONS = 75 80MAX_OUTSTANDING_CONNECTIONS = 75
81#SINGLE_PEERINFO_PER_HOST = YES 81#SINGLE_PEERINFO_PER_HOST = YES
@@ -85,6 +85,6 @@ MAX_OUTSTANDING_CONNECTIONS = 75
85DELETE_FILES = YES 85DELETE_FILES = YES
86 86
87[test_mesh_small] 87[test_mesh_small]
88WAIT_TIME = 300 88WAIT_TIME = 300 s
89CONNECTION_LIMIT = 16 89CONNECTION_LIMIT = 16
90#DATA_OUTPUT_FILE=data_output 90#DATA_OUTPUT_FILE=data_output
diff --git a/src/mesh/test_mesh_small_unicast_far.c b/src/mesh/test_mesh_small_unicast_far.c
index cc9995b48..1708e96cd 100644
--- a/src/mesh/test_mesh_small_unicast_far.c
+++ b/src/mesh/test_mesh_small_unicast_far.c
@@ -479,8 +479,8 @@ run (void *cls, char *const *args, const char *cfgfile,
479 mesh_peers = GNUNET_malloc (sizeof (GNUNET_PEER_Id) * (num_peers + 1)); 479 mesh_peers = GNUNET_malloc (sizeof (GNUNET_PEER_Id) * (num_peers + 1));
480 480
481 if (GNUNET_OK != 481 if (GNUNET_OK !=
482 GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small", 482 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "test_mesh_small",
483 "wait_time", &temp_wait)) 483 "WAIT_TIME", &wait_time))
484 { 484 {
485 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 485 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
486 "Option test_mesh_small:wait_time is required!\n"); 486 "Option test_mesh_small:wait_time is required!\n");
@@ -516,9 +516,6 @@ run (void *cls, char *const *args, const char *cfgfile,
516 } 516 }
517 } 517 }
518 518
519 wait_time =
520 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait);
521
522 if (GNUNET_YES == 519 if (GNUNET_YES ==
523 GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small", 520 GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small",
524 "output_file", &temp_str)) 521 "output_file", &temp_str))