aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-01-25 20:38:28 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-01-25 20:38:28 +0000
commita10ad008f65c44f2d6dafd397f2fc759f0308118 (patch)
tree5e867240aacf127bd8b710ac79f6f5145036096b
parent551fef7b00026b9e5801e9470620b837d58d0025 (diff)
downloadgnunet-a10ad008f65c44f2d6dafd397f2fc759f0308118.tar.gz
gnunet-a10ad008f65c44f2d6dafd397f2fc759f0308118.zip
read MAX_OPEN_FDS from configuration
-rw-r--r--src/testbed/gnunet-service-testbed.c7
-rw-r--r--src/testbed/gnunet-service-testbed.h5
-rw-r--r--src/testbed/testbed.conf.in3
3 files changed, 8 insertions, 7 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c
index 56bac51c9..ba693f1f6 100644
--- a/src/testbed/gnunet-service-testbed.c
+++ b/src/testbed/gnunet-service-testbed.c
@@ -2188,13 +2188,18 @@ testbed_run (void *cls, struct GNUNET_SERVER_Handle *server,
2188 &num)); 2188 &num));
2189 GST_cache_init ((unsigned int) num); 2189 GST_cache_init ((unsigned int) num);
2190 GNUNET_assert (GNUNET_OK == 2190 GNUNET_assert (GNUNET_OK ==
2191 GNUNET_CONFIGURATION_get_value_number (cfg, "TESTBED",
2192 "MAX_OPEN_FDS",
2193 &num));
2194 GST_opq_openfds =
2195 GNUNET_TESTBED_operation_queue_create_ ((unsigned int) num);
2196 GNUNET_assert (GNUNET_OK ==
2191 GNUNET_CONFIGURATION_get_value_string (cfg, "testbed", 2197 GNUNET_CONFIGURATION_get_value_string (cfg, "testbed",
2192 "HOSTNAME", &hostname)); 2198 "HOSTNAME", &hostname));
2193 our_config = GNUNET_CONFIGURATION_dup (cfg); 2199 our_config = GNUNET_CONFIGURATION_dup (cfg);
2194 GNUNET_SERVER_add_handlers (server, message_handlers); 2200 GNUNET_SERVER_add_handlers (server, message_handlers);
2195 GNUNET_SERVER_disconnect_notify (server, &client_disconnect_cb, NULL); 2201 GNUNET_SERVER_disconnect_notify (server, &client_disconnect_cb, NULL);
2196 ss_map = GNUNET_CONTAINER_multihashmap_create (5, GNUNET_NO); 2202 ss_map = GNUNET_CONTAINER_multihashmap_create (5, GNUNET_NO);
2197 GST_opq_openfds = GNUNET_TESTBED_operation_queue_create_ (GST_QLEN_OPENFDS);
2198 shutdown_task_id = 2203 shutdown_task_id =
2199 GNUNET_SCHEDULER_add_delayed_with_priority (GNUNET_TIME_UNIT_FOREVER_REL, 2204 GNUNET_SCHEDULER_add_delayed_with_priority (GNUNET_TIME_UNIT_FOREVER_REL,
2200 GNUNET_SCHEDULER_PRIORITY_IDLE, 2205 GNUNET_SCHEDULER_PRIORITY_IDLE,
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h
index 6165c91e5..61a69511b 100644
--- a/src/testbed/gnunet-service-testbed.h
+++ b/src/testbed/gnunet-service-testbed.h
@@ -55,11 +55,6 @@
55#define LIST_GROW_STEP 10 55#define LIST_GROW_STEP 10
56 56
57/** 57/**
58 * How long should the operation queue for open file descriptors be?
59 */
60#define GST_QLEN_OPENFDS 512
61
62/**
63 * Default timeout for operations which may take some time 58 * Default timeout for operations which may take some time
64 */ 59 */
65#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 15) 60#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 15)
diff --git a/src/testbed/testbed.conf.in b/src/testbed/testbed.conf.in
index 1634cf95d..38d6e5857 100644
--- a/src/testbed/testbed.conf.in
+++ b/src/testbed/testbed.conf.in
@@ -12,6 +12,7 @@ UNIXPATH = /tmp/gnunet-service-testbed.sock
12UNIX_MATCH_UID = YES 12UNIX_MATCH_UID = YES
13UNIX_MATCH_GID = YES 13UNIX_MATCH_GID = YES
14MAX_PARALLEL_OPERATIONS = 1000 14MAX_PARALLEL_OPERATIONS = 1000
15MAX_PARALLEL_SERVICE_CONNECTIONS = 1000 15MAX_PARALLEL_SERVICE_CONNECTIONS = 256
16MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 1 16MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 1
17HELLO_CACHE_SIZE = 30 17HELLO_CACHE_SIZE = 30
18MAX_OPEN_FDS = 512