diff options
Diffstat (limited to 'src/transport/test_transport_api_timeout.c')
-rw-r--r-- | src/transport/test_transport_api_timeout.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c index 9ce701a6f..8b92dce1e 100644 --- a/src/transport/test_transport_api_timeout.c +++ b/src/transport/test_transport_api_timeout.c | |||
@@ -40,8 +40,6 @@ | |||
40 | 40 | ||
41 | #define VERBOSE GNUNET_NO | 41 | #define VERBOSE GNUNET_NO |
42 | 42 | ||
43 | #define VERBOSE_ARM GNUNET_NO | ||
44 | |||
45 | #define START_ARM GNUNET_YES | 43 | #define START_ARM GNUNET_YES |
46 | 44 | ||
47 | /** | 45 | /** |
@@ -65,19 +63,19 @@ static GNUNET_SCHEDULER_TaskIdentifier die_task; | |||
65 | 63 | ||
66 | static GNUNET_SCHEDULER_TaskIdentifier timer_task; | 64 | static GNUNET_SCHEDULER_TaskIdentifier timer_task; |
67 | 65 | ||
68 | struct GNUNET_TRANSPORT_TESTING_handle *tth; | 66 | static struct GNUNET_TRANSPORT_TESTING_handle *tth; |
69 | 67 | ||
70 | struct PeerContext *p1; | 68 | static struct PeerContext *p1; |
71 | 69 | ||
72 | struct PeerContext *p2; | 70 | static struct PeerContext *p2; |
73 | 71 | ||
74 | static GNUNET_TRANSPORT_TESTING_ConnectRequest cc; | 72 | static GNUNET_TRANSPORT_TESTING_ConnectRequest cc; |
75 | 73 | ||
76 | struct GNUNET_TRANSPORT_TransmitHandle *th; | 74 | static struct GNUNET_TRANSPORT_TransmitHandle *th; |
77 | 75 | ||
78 | char *cfg_file_p1; | 76 | static char *cfg_file_p1; |
79 | 77 | ||
80 | char *cfg_file_p2; | 78 | static char *cfg_file_p2; |
81 | 79 | ||
82 | static struct GNUNET_TIME_Relative time_running; | 80 | static struct GNUNET_TIME_Relative time_running; |
83 | 81 | ||
@@ -192,6 +190,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
192 | th = NULL; | 190 | th = NULL; |
193 | } | 191 | } |
194 | 192 | ||
193 | |||
195 | static void | 194 | static void |
196 | timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 195 | timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
197 | { | 196 | { |
@@ -235,7 +234,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | |||
235 | 234 | ||
236 | shutdown_flag = GNUNET_NO; | 235 | shutdown_flag = GNUNET_NO; |
237 | 236 | ||
238 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Waiting for %llu seconds\n", (WAIT.rel_value) / 1000); | 237 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for %llu seconds\n", (WAIT.rel_value) / 1000); |
239 | 238 | ||
240 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 239 | if (die_task != GNUNET_SCHEDULER_NO_TASK) |
241 | GNUNET_SCHEDULER_cancel (die_task); | 240 | GNUNET_SCHEDULER_cancel (die_task); |
@@ -244,7 +243,8 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | |||
244 | timer_task = GNUNET_SCHEDULER_add_now (&timer, NULL); | 243 | timer_task = GNUNET_SCHEDULER_add_now (&timer, NULL); |
245 | } | 244 | } |
246 | 245 | ||
247 | void | 246 | |
247 | static void | ||
248 | start_cb (struct PeerContext *p, void *cls) | 248 | start_cb (struct PeerContext *p, void *cls) |
249 | { | 249 | { |
250 | static int started; | 250 | static int started; |
@@ -299,9 +299,6 @@ check () | |||
299 | static char *const argv[] = { "test-transport-api-timeout", | 299 | static char *const argv[] = { "test-transport-api-timeout", |
300 | "-c", | 300 | "-c", |
301 | "test_transport_api_data.conf", | 301 | "test_transport_api_data.conf", |
302 | #if VERBOSE | ||
303 | "-L", "DEBUG", | ||
304 | #endif | ||
305 | NULL | 302 | NULL |
306 | }; | 303 | }; |
307 | static struct GNUNET_GETOPT_CommandLineOption options[] = { | 304 | static struct GNUNET_GETOPT_CommandLineOption options[] = { |
@@ -329,11 +326,7 @@ main (int argc, char *argv[]) | |||
329 | GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name); | 326 | GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name); |
330 | 327 | ||
331 | GNUNET_log_setup (test_name, | 328 | GNUNET_log_setup (test_name, |
332 | #if VERBOSE | ||
333 | "DEBUG", | ||
334 | #else | ||
335 | "WARNING", | 329 | "WARNING", |
336 | #endif | ||
337 | NULL); | 330 | NULL); |
338 | 331 | ||
339 | GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source); | 332 | GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source); |