add units to time, use configuration time api where appropriate, fixing Mantis #1875
authorChristian Grothoff <christian@grothoff.org>
Thu, 17 Nov 2011 19:18:52 +0000 (19:18 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 17 Nov 2011 19:18:52 +0000 (19:18 +0000)
55 files changed:
src/ats-test/test_transport_ats_4addr.conf
src/ats/gnunet-service-ats_reservations.c
src/dht/test_dht_2dtorus.conf
src/dht/test_dht_api_data.conf
src/dht/test_dht_api_peer1.conf
src/dht/test_dht_multipeer_data.conf
src/dht/test_dht_twopeer_data.conf
src/fs/fs.conf
src/mesh/test_mesh.conf
src/mesh/test_mesh_2dtorus.conf
src/mesh/test_mesh_path.conf
src/mesh/test_mesh_small.c
src/mesh/test_mesh_small.conf
src/mesh/test_mesh_small_unicast_far.c
src/nse/gnunet-nse-profiler.c
src/nse/nse.conf
src/nse/nse_profiler_test.conf
src/nse/test_nse.conf
src/testing/test_testing_2dtorus.conf
src/testing/test_testing_data_topology_clique.conf
src/testing/test_testing_data_topology_stability.conf
src/testing/test_testing_large_topology.c
src/testing/test_testing_peergroup_data.conf
src/testing/test_testing_topology.c
src/testing/test_testing_topology_blacklist.c
src/testing/testing.conf
src/testing/testing_peergroup.c
src/transport/template_cfg_peer1.conf
src/transport/template_cfg_peer2.conf
src/transport/test_plugin_transport_data.conf
src/transport/test_quota_compliance_data.conf
src/transport/test_quota_compliance_tcp_asymmetric_peer2.conf
src/transport/test_quota_compliance_tcp_peer2.conf
src/transport/test_transport_api_bidirectional_connect_peer1.conf
src/transport/test_transport_api_bidirectional_connect_peer2.conf
src/transport/test_transport_api_disconnect_tcp_peer1.conf
src/transport/test_transport_api_disconnect_tcp_peer2.conf
src/transport/test_transport_api_limited_sockets_tcp_peer1.conf
src/transport/test_transport_api_limited_sockets_tcp_peer2.conf
src/transport/test_transport_api_multi_peer1.conf
src/transport/test_transport_api_multi_peer2.conf
src/transport/test_transport_api_reliability_http_peer1.conf
src/transport/test_transport_api_reliability_tcp_nat_peer1.conf
src/transport/test_transport_api_reliability_tcp_nat_peer2.conf
src/transport/test_transport_api_reliability_tcp_peer1.conf
src/transport/test_transport_api_reliability_tcp_peer2.conf
src/transport/test_transport_api_tcp_nat_peer1.conf
src/transport/test_transport_api_tcp_nat_peer2.conf
src/transport/test_transport_api_tcp_peer1.conf
src/transport/test_transport_api_tcp_peer2.conf
src/transport/test_transport_api_timeout_tcp_peer1.conf
src/transport/test_transport_defaults.conf
src/transport/transport.conf
src/util/test_service_data.conf
src/vpn/test-conf.conf

index 2fb476ced3154e7b08efa4d26b573a5b414ea171..830cd881001120c9224bcf0eb77d348a985323fb 100644 (file)
@@ -10,7 +10,7 @@ HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 ALLOW_NAT = NO
 
 [transport-tcp]
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [transport-udp]
 PORT = 2571
index f40e54516a0fc90c00640cde2e9b091cfd32f047..cb92ac748d130ec18435d84dce0efe8f413c0b1c 100644 (file)
@@ -92,6 +92,7 @@ GAS_reservations_set_bandwidth (const struct GNUNET_PeerIdentity *peer,
   struct GNUNET_BANDWIDTH_Tracker *tracker;
 
   tracker = GNUNET_CONTAINER_multihashmap_get (trackers, &peer->hashPubKey);
+  GNUNET_break (NULL != tracker);
   if (0 == ntohl (bandwidth_in.value__))
   {
     GNUNET_assert (GNUNET_YES ==
index 20ca30e3f2d9cda2d4f43e35aca173dd691e9ce0..0d7b9487959ae7af955907315c456daf3033b545 100644 (file)
@@ -37,8 +37,8 @@ INTERNAL_ADDRESS = 127.0.0.1
 EXTERNAL_ADDRESS = 127.0.0.1
 
 [core]
-TOTAL_QUOTA_IN = 91024000
-TOTAL_QUOTA_OUT = 91024000
+TOTAL_QUOTA_IN = 1 GB
+TOTAL_QUOTA_OUT = 1 GB
 AUTOSTART = YES
 PORT = 10003
 
@@ -58,13 +58,13 @@ CONNECT_TOPOLOGY = NONE
 #PERCENTAGE = 3
 #PROBABILITY = .1
 F2F = NO
-CONNECT_TIMEOUT = 60
+CONNECT_TIMEOUT = 60 s
 CONNECT_ATTEMPTS = 3
 DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES
-PEERGROUP_TIMEOUT = 2400
+PEERGROUP_TIMEOUT = 2400 s
 TOPOLOGY_OUTPUT_FILE = 2dtorus_topo_initial
 MAX_OUTSTANDING_CONNECTIONS = 75
 #SINGLE_PEERINFO_PER_HOST = YES
index bd73dbfb8f08969d4483de7959b616aacc1dc4d7..610733399c6ceb612ef59ff1057c4ad7d99d703b 100644 (file)
@@ -21,8 +21,8 @@ FRIENDS-ONLY = NO
 MINIMUM-FRIENDS = 0
 
 [core]
-TOTAL_QUOTA_OUT = 93932160
-TOTAL_QUOTA_IN = 93932160
+TOTAL_QUOTA_OUT = 1 GB
+TOTAL_QUOTA_IN = 1 GB
 PORT = 2092
 
 [dht]
@@ -52,7 +52,7 @@ DEFAULTSERVICES =
 PORT = 2087
 
 [transport-tcp]
-TIMEOUT = 300000
+TIMEOUT = 300 s
 PORT = 2094
 
 [TESTING]
index 6bd5a892093c6516123e1d6e5e28711e44e3f639..075234232aba13e2cf2be1906701698ca55a8e65 100644 (file)
@@ -29,8 +29,8 @@ NEIGHBOUR_LIMIT = 50
 PORT = 12365
 
 [core]
-TOTAL_QUOTA_OUT = 93932160
-TOTAL_QUOTA_IN = 93932160
+TOTAL_QUOTA_OUT = 1 GB
+TOTAL_QUOTA_IN = 1 GB
 PORT = 12092
 
 [arm]
@@ -39,7 +39,7 @@ PORT = 12366
 DEBUG = NO
 
 [transport-tcp]
-TIMEOUT = 300000
+TIMEOUT = 300 s
 PORT = 12368
 BINDTO = 127.0.0.1
 
index 9268153d7ff21463d205475ecb901f093b1c8594..941d5bf67639fabe0c1d1fd9f314fbd37329fe16 100644 (file)
@@ -46,8 +46,8 @@ PORT = 12365
 PLUGIN = mysql_dump
 
 [core]
-TOTAL_QUOTA_OUT = 93932160
-TOTAL_QUOTA_IN = 93932160
+TOTAL_QUOTA_OUT = 1 GB
+TOTAL_QUOTA_IN = 1 GB
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 BINARY = gnunet-service-core
@@ -69,7 +69,7 @@ PORT = 12366
 DEBUG = NO
 
 [transport-tcp]
-TIMEOUT = 300000
+TIMEOUT = 300 s
 PORT = 12368
 BINDTO = 127.0.0.1
 
@@ -89,7 +89,7 @@ CONNECT_TOPOLOGY = NONE
 
 TOPOLOGY_FILE = multipeer_topo.dat
 MAX_CONCURRENT_SSH = 1
-PEERGROUP_TIMEOUT = 10000
+PEERGROUP_TIMEOUT = 10 s
 USE_PROGRESSBARS = YES
 #CONNECT_TOPOLOGY_OPTION = CONNECT_RANDOM_SUBSET
 #CONNECT_TOPOLOGY_OPTION_MODIFIER = 2
index 0cb0f18ab39f7998ea387ada2a63221a92116ca3..418772fc752689c9b056fd795bbbb24c5aaaac6e 100644 (file)
@@ -26,8 +26,8 @@ NEIGHBOUR_LIMIT = 50
 PORT = 12365
 
 [core]
-TOTAL_QUOTA_OUT = 93932160
-TOTAL_QUOTA_IN = 93932160
+TOTAL_QUOTA_OUT = 1 GB
+TOTAL_QUOTA_IN = 1 GB
 HOSTNAME = localhost
 PORT = 12092
 
@@ -37,7 +37,7 @@ PORT = 12366
 DEBUG = NO
 
 [transport-tcp]
-TIMEOUT = 300000
+TIMEOUT = 300 s
 PORT = 12368
 BINDTO = 127.0.0.1
 
index 7e3fecd7b060d5f68b9679b87bc2ecfd217e4f8a..2f65859b4cd308fa7e1f48b69f9952929f886be9 100644 (file)
@@ -26,7 +26,7 @@ MAX_PENDING_REQUESTS = 65536
 # Maximum frequency we're allowed to poll the datastore
 # for content for migration (can be used to reduce 
 # GNUnet's disk-IO rate)
-MIN_MIGRATION_DELAY = 100
+MIN_MIGRATION_DELAY = 100 ms
 EXPECTED_NEIGHBOUR_COUNT = 128
 
 
index b619591b88de3f1cc1d6076e49c399b096e6fc0d..bf4d4dfe76f09853cf90c7ce2ec381ed31dfc6b5 100644 (file)
@@ -47,7 +47,7 @@ PORT = 12366
 DEBUG = NO
 
 [transport-tcp]
-TIMEOUT = 300000
+TIMEOUT = 300 s
 PORT = 12368
 
 [TESTING]
index 35d69f02bb48f0b4da61b66d8ae7eaaf9672b265..90ebd73af330c811ce20ec391d517acf630a33fa 100644 (file)
@@ -69,13 +69,13 @@ CONNECT_TOPOLOGY = 2D_TORUS
 #PERCENTAGE = 3
 #PROBABILITY = .1
 F2F = NO
-CONNECT_TIMEOUT = 600
+CONNECT_TIMEOUT = 600 s
 CONNECT_ATTEMPTS = 2
 DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES
-PEERGROUP_TIMEOUT = 2400
+PEERGROUP_TIMEOUT = 2400 s
 TOPOLOGY_OUTPUT_FILE = mesh_topo_initial
 MAX_OUTSTANDING_CONNECTIONS = 75
 #SINGLE_PEERINFO_PER_HOST = YES
index b619591b88de3f1cc1d6076e49c399b096e6fc0d..bf4d4dfe76f09853cf90c7ce2ec381ed31dfc6b5 100644 (file)
@@ -47,7 +47,7 @@ PORT = 12366
 DEBUG = NO
 
 [transport-tcp]
-TIMEOUT = 300000
+TIMEOUT = 300 s
 PORT = 12368
 
 [TESTING]
index 54c5eb45f44d6ca3d3c9997c3e4ac3545301546e..2757da47ced179db086e38f8e0f700c544be20ba 100644 (file)
@@ -769,8 +769,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   mesh_peers = GNUNET_malloc (sizeof (uint16_t) * (num_peers + 1));
 
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small",
-                                             "wait_time", &temp_wait))
+      GNUNET_CONFIGURATION_get_value_time (testing_cfg, "test_mesh_small",
+                                          "WAIT_TIME", &wait_time))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Option test_mesh_small:wait_time is required!\n");
@@ -806,9 +806,6 @@ run (void *cls, char *const *args, const char *cfgfile,
     }
   }
 
-  wait_time =
-      GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait);
-
   if (GNUNET_YES ==
       GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small",
                                              "output_file", &temp_str))
index ee5649498b729fb90be7886fdb3c09680b6bb329..20e13b863ac9f2fd5d466bf83c0f97f59b48a589 100644 (file)
@@ -40,8 +40,8 @@ INTERNAL_ADDRESS = 127.0.0.1
 EXTERNAL_ADDRESS = 127.0.0.1
 
 [core]
-TOTAL_QUOTA_IN = 999111999
-TOTAL_QUOTA_OUT = 999111999
+TOTAL_QUOTA_IN = 1 GB
+TOTAL_QUOTA_OUT = 1 GB
 AUTOSTART = YES
 PORT = 10003
 
@@ -69,13 +69,13 @@ CONNECT_TOPOLOGY = 2D_TORUS
 #PERCENTAGE = 3
 #PROBABILITY = .1
 F2F = NO
-CONNECT_TIMEOUT = 660
+CONNECT_TIMEOUT = 660 s
 CONNECT_ATTEMPTS = 2
 DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES
-PEERGROUP_TIMEOUT = 2400
+PEERGROUP_TIMEOUT = 2400 s
 TOPOLOGY_OUTPUT_FILE = mesh_topo_initial
 MAX_OUTSTANDING_CONNECTIONS = 75
 #SINGLE_PEERINFO_PER_HOST = YES
@@ -85,6 +85,6 @@ MAX_OUTSTANDING_CONNECTIONS = 75
 DELETE_FILES = YES
 
 [test_mesh_small]
-WAIT_TIME = 300
+WAIT_TIME = 300 s
 CONNECTION_LIMIT = 16
 #DATA_OUTPUT_FILE=data_output
index cc9995b48bee1cd9a603d0f290ad790b76f482e1..1708e96cdac0576f9cf973c440071c6fc4e8a8fd 100644 (file)
@@ -479,8 +479,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   mesh_peers = GNUNET_malloc (sizeof (GNUNET_PEER_Id) * (num_peers + 1));
 
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small",
-                                             "wait_time", &temp_wait))
+      GNUNET_CONFIGURATION_get_value_time (testing_cfg, "test_mesh_small",
+                                          "WAIT_TIME", &wait_time))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Option test_mesh_small:wait_time is required!\n");
@@ -516,9 +516,6 @@ run (void *cls, char *const *args, const char *cfgfile,
     }
   }
 
-  wait_time =
-      GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait);
-
   if (GNUNET_YES ==
       GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small",
                                              "output_file", &temp_str))
index 4ad689be90d1a1b7ac623b66e2e8f2ca8b0ed05d..d097b96aa0992dbf830b5867c0f36c6bf194ff27 100644 (file)
@@ -557,8 +557,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   }
 
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_number (testing_cfg, "nse-profiler",
-                                             "wait_time", &temp_wait))
+      GNUNET_CONFIGURATION_get_value_time (testing_cfg, "nse-profiler",
+                                          "WAIT_TIME", &wait_time))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Option nse-profiler:wait_time is required!\n");
@@ -611,9 +611,6 @@ run (void *cls, char *const *args, const char *cfgfile,
   }
 
 
-  wait_time =
-      GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait);
-
   if (GNUNET_YES ==
       GNUNET_CONFIGURATION_get_value_string (cfg, "nse-profiler", "output_file",
                                              &temp_str))
index 318fd15fd41a44aabcf497e90f21e121940c4af7..5a7835e82d4db38d6410bcdbbdd77b016578459b 100644 (file)
@@ -14,11 +14,11 @@ PROOFFILE = $SERVICEHOME/.nse-proof
 HISTOGRAM = $SERVICEHOME/nse-history.log
 
 # How 'slowly' should the proof-of-work be constructed (delay
-# between rounds in ms); sane values between 0 and ~1000.
-WORKDELAY = 5
+# between rounds); sane values between 0 and ~1000.
+WORKDELAY = 5 ms
 
 # Note: changing any of the values below will make this peer
 # completely incompatible with other peers! 
-INTERVAL = 3600000
+INTERVAL = 1 h
 WORKBITS = 20
 
index 411bad9f0f47a226a5284bb40e4b07fe4fdf2b0f..c0f584ce4819e04052905e0d07db42d0be007e4d 100644 (file)
@@ -13,8 +13,8 @@ DEBUG = NO
 CONFIG = $DEFAULTCONFIG
 # Overriding network settings for faster testing (do NOT use
 # these values in production just because they are here)
-WORKDELAY = 10000
-INTERVAL = 15000
+WORKDELAY = 10 s
+INTERVAL = 15 s
 WORKBITS = 0
 PROOFFILE = $SERVICEHOME/nse.proof
 
@@ -80,13 +80,13 @@ CONNECT_TOPOLOGY = SMALL_WORLD_RING
 PERCENTAGE = 3
 #PROBABILITY = .1
 F2F = NO
-CONNECT_TIMEOUT = 60
+CONNECT_TIMEOUT = 60 s
 CONNECT_ATTEMPTS = 3
 #DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 20
 USE_PROGRESSBARS = YES
-PEERGROUP_TIMEOUT = 1000
+PEERGROUP_TIMEOUT = 1000 s
 TOPOLOGY_OUTPUT_FILE = nse_topo_1000_peers_initial
 MAX_OUTSTANDING_CONNECTIONS = 200
 #SINGLE_PEERINFO_PER_HOST = YES
@@ -105,5 +105,5 @@ TOPOLOGY_OUTPUT_FILE = nse_topo_100_peers
 #ROUND3 = 100
 #ROUND2 = 500
 #ROUND3 = 1000
-WAIT_TIME = 120
+WAIT_TIME = 120 s
 CONNECTION_LIMIT = 10
index ba33f7fc55c3724907661a90d9cfe1bbf1449780..48944c11908002869930d6a5d98f459c3fec8a2d 100644 (file)
@@ -14,8 +14,8 @@ CONFIG = $DEFAULTCONFIG
 PROOFFILE = $SERVICEHOME/proof.nse
 # Overriding network settings for faster testing (do NOT use
 # these values in production just because they are here)
-WORKDELAY = 1
-INTERVAL = 60000
+WORKDELAY = 1 ms
+INTERVAL = 60 s
 WORKBITS = 1
 
 HISTOGRAM = $SERVICEHOME/nse-histogram
@@ -64,13 +64,13 @@ TOPOLOGY = NONE
 CONNECT_TOPOLOGY = SMALL_WORLD_RING
 PERCENTAGE = 3
 F2F = NO
-CONNECT_TIMEOUT = 60
+CONNECT_TIMEOUT = 60 s
 CONNECT_ATTEMPTS = 3
 #DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 20
 USE_PROGRESSBARS = YES
-PEERGROUP_TIMEOUT = 1000
+PEERGROUP_TIMEOUT = 1000 s
 
 DELETE_FILES = NO
 
index 8cf2f8f626314147510bc1a6f7d79e93a6af32db..da5f90c9c6e994db4a0c954c85d036c58ebf653c 100644 (file)
@@ -40,8 +40,8 @@ INTERNAL_ADDRESS = 127.0.0.1
 EXTERNAL_ADDRESS = 127.0.0.1
 
 [core]
-TOTAL_QUOTA_IN = 999111999
-TOTAL_QUOTA_OUT = 999111999
+TOTAL_QUOTA_IN = 1 GB
+TOTAL_QUOTA_OUT = 1 GB
 AUTOSTART = YES
 PORT = 10003
 
@@ -61,13 +61,13 @@ CONNECT_TOPOLOGY = 2D_TORUS
 #PERCENTAGE = 3
 #PROBABILITY = .1
 F2F = NO
-CONNECT_TIMEOUT = 600
+CONNECT_TIMEOUT = 600 s
 CONNECT_ATTEMPTS = 2
 DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES
-PEERGROUP_TIMEOUT = 2400
+PEERGROUP_TIMEOUT = 2400 s
 TOPOLOGY_OUTPUT_FILE = testing_topo_initial
 MAX_OUTSTANDING_CONNECTIONS = 75
 #SINGLE_PEERINFO_PER_HOST = YES
index 168af17f4bcc44af470629393568c217ab4685d2..69cecb7e9bfee58c592cb69b4bd885695bfc4d67 100644 (file)
@@ -3,8 +3,8 @@
 DEFAULTCONFIG = test_testing_data_topology_clique.conf
 
 [TESTING]
-CONNECT_TIMEOUT = 180
+CONNECT_TIMEOUT = 180 s
 CONNECT_ATTEMPTS = 14
 NUM_PEERS = 4
 TOPOLOGY = CLIQUE
-
+SETTLE_TIME = 0
index fc35fc8ab7275a93d6e4b0a9d385c1ec36039fb1..1bfcd1bdebd93a4b132f26bf2e678e86c6c249e9 100644 (file)
@@ -3,7 +3,7 @@
 DEFAULTCONFIG = test_testing_data_topology_clique.conf
 
 [TESTING]
-SETTLE_TIME = 600
+SETTLE_TIME = 600 s
 NUM_PEERS = 2
 TOPOLOGY = CLIQUE
 
index 78d91fa3d5800e9f001b0b9aebca2071551c369b..a2715450750f704fa903f5bac672b072faeffb20 100644 (file)
@@ -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;
   }
 
index be734c7d24b039ce6637cc4508489b87cbf8501e..6eadede95639dcb610399ee6a6d8d7a09166d2b2 100644 (file)
@@ -6,7 +6,7 @@ DEFAULTCONFIG = test_testing_peergroup_data.conf
 CONNECT_ATTEMPTS = 2
 MAX_OUTSTANDING_CONNECTIONS = 20
 MAX_CONCURRENT_SSH = 1
-PEERGROUP_TIMEOUT = 300
+PEERGROUP_TIMEOUT = 300 s
 TOPOLOGY = CLIQUE
 PERCENTAGE = 0.5
 PROBABILITY = 0.5
index deaeae4571922ab3212372bb4baddc82ba30ae91..ba092220a25e96dbfafa0b2d101c2d4f8cc7a516 100644 (file)
@@ -999,7 +999,6 @@ run (void *cls, char *const *args, const char *cfgfile,
   char *blacklist_topology_str;
   char *connect_topology_option_str;
   char *connect_topology_option_modifier_string;
-  unsigned long long temp_settle;
   unsigned long long max_outstanding_connections;
 
   ok = 1;
@@ -1101,21 +1100,21 @@ 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_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_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_OK !=
+      GNUNET_CONFIGURATION_get_value_time (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;
   }
 
index 046cb2ca52c94449e48dc578677c6a8f14daa79b..d53fc8cbebf53eaaac1bd6a652ae3a6d253d13ec 100644 (file)
@@ -390,7 +390,6 @@ run (void *cls, char *const *args, const char *cfgfile,
   unsigned long long connect_topology_num;
   unsigned long long blacklist_topology_num;
   unsigned long long connect_topology_option_num;
-  unsigned long long temp_connect;
   char *connect_topology_option_modifier_string;
 
   ok = 1;
@@ -485,15 +484,12 @@ run (void *cls, char *const *args, const char *cfgfile,
                                              &num_peers))
     num_peers = DEFAULT_NUM_PEERS;
 
-  if (GNUNET_OK ==
-      GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "connect_timeout",
-                                             &temp_connect))
-    connect_timeout =
-        GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_connect);
-  else
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_time (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;
   }
 
index 1604ebc3a0c613128881e5977bb9a15ca2148065..7e25f8c138aad666e914f02ccd0a20cfc16ddbeb 100644 (file)
@@ -1,6 +1,6 @@
 [TESTING]
 # How long before failing a connection?
-CONNECT_TIMEOUT = 30
+CONNECT_TIMEOUT = 30 s
 # How many connect attempts should we make?
 CONNECT_ATTEMPTS = 3
 # How many connections can happen simultaneously?
index 837b50c084e6977b63bc51f36f028522e062d21e..0923dfc50531c9536e90660dead99d5674ec0478 100644 (file)
@@ -33,7 +33,7 @@
 #include "gnunet_disk_lib.h"
 
 /** Globals **/
-#define DEFAULT_CONNECT_TIMEOUT 30 // FIXME: use fancy time
+#define DEFAULT_CONNECT_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
 
 #define DEFAULT_CONNECT_ATTEMPTS 2
 
@@ -55,7 +55,7 @@ struct PeerGroupStartupContext
   /**
    * How long to spend trying to establish all the connections?
    */
-  unsigned long long connect_timeout; // FIXME: use fancy time
+  struct GNUNET_TIME_Relative connect_timeout;
   
   unsigned long long max_concurrent_ssh;
   struct GNUNET_TIME_Absolute timeout;
@@ -508,10 +508,7 @@ internal_peers_started_callback (void *cls,
                                            pg_start_ctx->connect_topology,
                                            pg_start_ctx->connect_topology_option,
                                            pg_start_ctx->connect_topology_option_modifier,
-                                           // FIXME: use fancy time
-                                           GNUNET_TIME_relative_multiply(
-                                             GNUNET_TIME_UNIT_SECONDS,
-                                             pg_start_ctx->connect_timeout),
+                                          pg_start_ctx->connect_timeout,
                                            pg_start_ctx->connect_attempts, NULL,
                                            NULL);
 
@@ -740,6 +737,7 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
   unsigned long long temp_config_number;
   char *temp_str;
   int temp;
+  struct GNUNET_TIME_Relative rtimeout;
 
   GNUNET_assert (total > 0);
   GNUNET_assert (cfg != NULL);
@@ -757,10 +755,10 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
   }
 
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "connect_timeout",
-                                             &pg_start_ctx->connect_timeout))
+      GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT",
+                                          &pg_start_ctx->connect_timeout))
   {
-    pg_start_ctx->connect_timeout = DEFAULT_CONNECT_TIMEOUT;
+      pg_start_ctx->connect_timeout = DEFAULT_CONNECT_TIMEOUT;
   }
 
   if (GNUNET_OK !=
@@ -796,21 +794,18 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
     return NULL;
   }
 
-  if (GNUNET_OK ==
+  if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_number (cfg, "testing",
-                                             "peergroup_timeout",
-                                             &temp_config_number))
-    pg_start_ctx->timeout =
-        GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply
-                                          (GNUNET_TIME_UNIT_SECONDS,
-                                           temp_config_number));
-  else
+                                             "PEERGROUP_TIMEOUT",
+                                             &rtimeout))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
-                "testing", "peergroup_timeout");
+                "testing", "PEERGROUP_TIMEOUT");
     GNUNET_free (pg_start_ctx);
     return NULL;
   }
+  pg_start_ctx->timeout =
+    GNUNET_TIME_relative_to_absolute (rtimeout);
 
 
   /* Read topology related options from the configuration file */
index 90ad9ab06516df9b966c0b6102b2cc464460c87d..961c98b8fc3d01e10f36c873984933776a0ce437 100644 (file)
@@ -12,7 +12,7 @@ DISABLEV6 = NO
 
 [transport-tcp]
 PORT = 12000
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12005
index cb5935f8107e6944e828c42fa7108b906da321e8..e46f0b8a17ff10dac4b5c2496bbb16630b9c5b2c 100644 (file)
@@ -12,7 +12,7 @@ DISABLEV6 = NO
 
 [transport-tcp]
 PORT = 12100
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12014
index e3e619fb3fd499265570255b7f7dc68ead4e66e8..adc7a59bf7b67ec0ef9fc9fc85f03fd0f82cc592 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_plugin_transport_data.conf
 
 [transport-tcp]
 PORT = 2368
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 2366
index 7f93a15ba4a396755d7aab0dc2827856ddf812c4..93f75dd0b9fa44c7cec8e2dc0a1b4f558056877d 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_quota_compliance_data.conf
 
 [transport-tcp]
 PORT = 2368
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 2366
index 18295ac60088ff4504e7e3e8c480d46e54cd739c..75a4fe9cf9bbf242fd9eb1ed6595f0eac9f771f8 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_quota_compliance_tcp_asymmetric_peer2.conf
 
 [transport-tcp]
 PORT = 12015
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12014
index 4765075882ee1f16fbc072c6b1ce21d58bd39f24..18b199c423beca140a7b3a8e001f03d0ff47ae7a 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_quota_compliance_tcp_peer2.conf
 
 [transport-tcp]
 PORT = 12015
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12014
index b66c6c44131f17bfa84189e2d1678d41448bb3c1..21591b5ab5c79d9652e2aab091e36b3687add18e 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_bidirectional_connect_peer1.conf
 
 [transport-tcp]
 PORT = 12000
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12005
index c959b51793969d88e84d7526bb30e9dac0a5050a..db3ba8cd74774bf97c57c70b71bfe3dfa7b05585 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_bidirectional_connect_peer2.conf
 
 [transport-tcp]
 PORT = 12015
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12014
index 2df5a6175b5ddbc05969940c2778964db9625420..8bfa374023110e7e5b8354b7775c9a1d9d364bc3 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_tcp_peer1.conf
 
 [transport-tcp]
 PORT = 12000
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12005
index 04500ea175c2e45482bd1df0a5b8bb0db2439e22..6bb7fadff6e87287274a2c2cd633c05342724c1b 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_tcp_peer2.conf
 
 [transport-tcp]
 PORT = 12015
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12014
index 90e329f0d92050396460441c602326c7ce9bc480..dee44f63f59bc1dba7a85d0ed0a5b351d88dc7f0 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_tcp_peer1.conf
 
 [transport-tcp]
 PORT = 12000
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12005
index 1531769073bd0a15a3b0bf20d57764e5c737ecb7..04324f46eaa4d7be0d779b16a08e6a01b3ead339 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_tcp_peer2.conf
 
 [transport-tcp]
 PORT = 0
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12014
index 272d19c416db95b54ef4aa142b4b954cb5e87de2..a7c57fc3b48d479cf51b0c714982693dfe37e75e 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_multi_peer1.conf
 
 [transport-tcp]
 PORT = 12140
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [transport-udp]
 PORT = 12141
index 86f51e3944175a2c14baf56151fb69da704540fe..8008e7ff2d866c000577ca1fa1819427e710c211 100644 (file)
@@ -8,7 +8,7 @@ ALLOW_NAT = NO
 
 [transport-tcp]
 PORT = 12150
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [transport-udp]
 PORT = 12151
index 9c4c73251479a17377f65e6af800cb8ec25c8f03..b0641e1a243ec1e39ba57ea42497a26375a512c3 100644 (file)
@@ -8,7 +8,7 @@ TOTAL_QUOTA_OUT = 1073741824
 TOTAL_QUOTA_IN  = 1073741824
 
 [transport-tcp]
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [transport-http]
 PORT = 12180
index 2ab9c8218575a5046ff323a1de52a4733b0dabec..2efaef33a1b5e2a1b22fbd5a21d20a4436cd0af8 100644 (file)
@@ -4,8 +4,8 @@ SERVICEHOME = /tmp/test-transport/api-reliability-tcp-nat-p1/
 DEFAULTCONFIG = test_transport_api_reliability_tcp_nat_peer1.conf
 
 [core]
-TOTAL_QUOTA_OUT = 1073741824 
-TOTAL_QUOTA_IN  = 1073741824
+TOTAL_QUOTA_OUT = 1 GB
+TOTAL_QUOTA_IN  = 1 GB
 
 [nat]
 BEHIND_NAT = YES
@@ -14,7 +14,7 @@ DISABLEV6 = YES
 
 [transport-tcp]
 PORT = 0
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 1204
index 366ed186ce6b4cc9ee28eda9208841e5dab098d9..19ac0bcdaffdfda0bfc88200117b1c0aa9eb9ce0 100644 (file)
@@ -4,8 +4,8 @@ SERVICEHOME = /tmp/test-transport/api-reliability-tcp-nat-p2/
 DEFAULTCONFIG = test_transport_api_reliability_tcp_nat_peer2.conf
 
 [core]
-TOTAL_QUOTA_OUT = 1073741824 
-TOTAL_QUOTA_IN  = 1073741824
+TOTAL_QUOTA_OUT = 1 GB
+TOTAL_QUOTA_IN  = 1 GB
 
 [nat]
 DISABLEV6 = YES
@@ -13,7 +13,7 @@ ENABLE_NAT_CLIENT = YES
 
 [transport-tcp]
 PORT = 12030
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12034
index 04e5935e3aa793a6bfff650a73148338290e9c05..123357e39b7c5cb591aadf19be795f6b2032931b 100644 (file)
@@ -4,12 +4,12 @@ SERVICEHOME = /tmp/test-transport/api-tcp-p1/
 DEFAULTCONFIG = test_transport_api_reliability_tcp_peer1.conf
        
 [core]
-TOTAL_QUOTA_OUT = 1073741824 
-TOTAL_QUOTA_IN  = 1073741824
+TOTAL_QUOTA_OUT = 1 GB
+TOTAL_QUOTA_IN  = 1 GB
 
 [transport-tcp]
 PORT = 12000
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12005
index 506aad2dc344b084f342eb10cef2973348e3d8d6..7d6aea04b8ac3dec8b8d8bf1038975db6a0db860 100644 (file)
@@ -4,12 +4,12 @@ SERVICEHOME = /tmp/test-transport/api-tcp-p2/
 DEFAULTCONFIG = test_transport_api_reliability_tcp_peer2.conf
 
 [core]
-TOTAL_QUOTA_OUT = 1073741824 
-TOTAL_QUOTA_IN  = 1073741824
+TOTAL_QUOTA_OUT = 1 GB
+TOTAL_QUOTA_IN  = 1 GB
 
 [transport-tcp]
 PORT = 12015
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12014
index 7e191dc51537070fbad66015d799b99e489b5dd9..78afb3db83c0874e5073e7f64824077223e9df6e 100644 (file)
@@ -10,7 +10,7 @@ DISABLEV6 = YES
 
 [transport-tcp]
 PORT = 0
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 1204
index 50f9fb5808be1b89ffe825489eaba6fafd02bace..d94ebb174e6e845563716e63636300bf7e403b66 100644 (file)
@@ -9,7 +9,7 @@ ENABLE_NAT_CLIENT = YES
 
 [transport-tcp]
 PORT = 12030
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12034
index 2df5a6175b5ddbc05969940c2778964db9625420..8bfa374023110e7e5b8354b7775c9a1d9d364bc3 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_tcp_peer1.conf
 
 [transport-tcp]
 PORT = 12000
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12005
index 04500ea175c2e45482bd1df0a5b8bb0db2439e22..6bb7fadff6e87287274a2c2cd633c05342724c1b 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_tcp_peer2.conf
 
 [transport-tcp]
 PORT = 12015
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12014
index 0b47db9e725bed93cfddf5edd1dcb88f9c9e01e4..89beecb52bfa0f46f81847407a1306853663cb3c 100644 (file)
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_timeout_tcp_peer1.conf
 
 [transport-tcp]
 PORT = 12000
-TIMEOUT = 5000
+TIMEOUT = 5 s
 
 [arm]
 PORT = 12005
index 60a65dec59b93a817ed2e3d04d9597b766431adc..72e62746fac7e291f64ec605dea154a52edda454 100644 (file)
@@ -3,7 +3,7 @@ SERVICEHOME = /tmp/test-transport-api/
 DEFAULTCONFIG = test_transport_defaults.conf
 
 [transport-tcp]
-TIMEOUT = 300000
+TIMEOUT = 300 s
 
 [arm]
 DEFAULTSERVICES = 
index ded8e304d57250a8528d73546864f163db10bfac..7bd9de95eaab5dcd5fd6567438b4e3288e777760 100644 (file)
@@ -32,7 +32,7 @@ ADVERTISED_PORT = 2086
 # Maximum number of open TCP connections allowed
 MAX_CONNECTIONS = 128
 
-TIMEOUT = 5000
+TIMEOUT = 5 s
 # ACCEPT_FROM =
 # ACCEPT_FROM6 =
 # REJECT_FROM =
index 9d283f955fbdf75e7affb17edfa407fba55a687f..7f6baaab178fe78b01212c2a5e8e4f361870c9f7 100644 (file)
@@ -2,7 +2,7 @@
 PORT=12435
 BINDTO=localhost
 PIDFILE=/tmp/test-service.pid
-TIMEOUT=30000
+TIMEOUT=30 s
 MAXBUF=1024
 DISABLEV6=NO
 ACCEPT_FROM=127.0.0.1;
@@ -14,7 +14,7 @@ HOSTNAME=localhost
 [test_service6]
 PORT=12435
 PIDFILE=/tmp/test-service.pid
-TIMEOUT=30000
+TIMEOUT=30 s
 MAXBUF=1024
 DISABLEV6=NO
 ACCEPT_FROM=127.0.0.1;
index 2b6186b2ddd66b353240020b5ff2f416a3aa754f..ba17477744ff095ac25e75afbf6ef65b8e47da2f 100644 (file)
@@ -17,7 +17,7 @@ HOME = $SERVICEHOME
 
 [transport-tcp]
 PORT = 2086
-TIMEOUT = 300000
+TIMEOUT = 300s
 # MAXBUF =
 # DISABLEV6 =
 # BINDTO =