diff options
-rw-r--r-- | src/transport/test_transport_api_limited_sockets.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index 8b8cdc07a..e6ad84a22 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c | |||
@@ -18,7 +18,7 @@ | |||
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | /** | 20 | /** |
21 | * @file transport/test_transport_api.c | 21 | * @file transport/test_transport_api_limited_sockets.c |
22 | * @brief base test case for transport implementations | 22 | * @brief base test case for transport implementations |
23 | * | 23 | * |
24 | * This test case serves as a base for tcp, udp, and udp-nat | 24 | * This test case serves as a base for tcp, udp, and udp-nat |
@@ -69,19 +69,19 @@ static GNUNET_SCHEDULER_TaskIdentifier die_task; | |||
69 | 69 | ||
70 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 70 | static GNUNET_SCHEDULER_TaskIdentifier send_task; |
71 | 71 | ||
72 | struct PeerContext *p1; | 72 | static struct PeerContext *p1; |
73 | 73 | ||
74 | struct PeerContext *p2; | 74 | static struct PeerContext *p2; |
75 | 75 | ||
76 | static GNUNET_TRANSPORT_TESTING_ConnectRequest cc; | 76 | static GNUNET_TRANSPORT_TESTING_ConnectRequest cc; |
77 | 77 | ||
78 | struct GNUNET_TRANSPORT_TransmitHandle *th; | 78 | static struct GNUNET_TRANSPORT_TransmitHandle *th; |
79 | 79 | ||
80 | struct GNUNET_TRANSPORT_TESTING_handle *tth; | 80 | static struct GNUNET_TRANSPORT_TESTING_handle *tth; |
81 | 81 | ||
82 | char *cfg_file_p1; | 82 | static char *cfg_file_p1; |
83 | 83 | ||
84 | char *cfg_file_p2; | 84 | static char *cfg_file_p2; |
85 | 85 | ||
86 | #if VERBOSE | 86 | #if VERBOSE |
87 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 87 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
@@ -228,7 +228,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | |||
228 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &sendtask, NULL); | 228 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &sendtask, NULL); |
229 | } | 229 | } |
230 | 230 | ||
231 | void | 231 | static void |
232 | start_cb (struct PeerContext *p, void *cls) | 232 | start_cb (struct PeerContext *p, void *cls) |
233 | { | 233 | { |
234 | static int started; | 234 | static int started; |
@@ -334,11 +334,10 @@ main (int argc, char *argv[]) | |||
334 | int res; | 334 | int res; |
335 | 335 | ||
336 | res = getrlimit (RLIMIT_NOFILE, &r_file_old); | 336 | res = getrlimit (RLIMIT_NOFILE, &r_file_old); |
337 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 337 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
338 | "Maximum number of open files was: %u/%u\n", r_file_old.rlim_cur, | 338 | "Maximum number of open files was: %u/%u\n", r_file_old.rlim_cur, |
339 | r_file_old.rlim_max); | 339 | r_file_old.rlim_max); |
340 | 340 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | |
341 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
342 | "Setting maximum number of open files to: %u\n", MAX_FILES); | 341 | "Setting maximum number of open files to: %u\n", MAX_FILES); |
343 | r_file_new.rlim_cur = MAX_FILES; | 342 | r_file_new.rlim_cur = MAX_FILES; |
344 | r_file_new.rlim_max = r_file_old.rlim_max; | 343 | r_file_new.rlim_max = r_file_old.rlim_max; |
@@ -367,7 +366,7 @@ main (int argc, char *argv[]) | |||
367 | GNUNET_free (test_name); | 366 | GNUNET_free (test_name); |
368 | 367 | ||
369 | #if HAVE_SETRLIMIT | 368 | #if HAVE_SETRLIMIT |
370 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 369 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
371 | "Restoring previous value maximum number of open files\n"); | 370 | "Restoring previous value maximum number of open files\n"); |
372 | res = setrlimit (RLIMIT_NOFILE, &r_file_old); | 371 | res = setrlimit (RLIMIT_NOFILE, &r_file_old); |
373 | if (res != 0) | 372 | if (res != 0) |
@@ -376,8 +375,7 @@ main (int argc, char *argv[]) | |||
376 | return 0; | 375 | return 0; |
377 | } | 376 | } |
378 | #endif | 377 | #endif |
379 | |||
380 | return ret; | 378 | return ret; |
381 | } | 379 | } |
382 | 380 | ||
383 | /* end of test_transport_api.c */ | 381 | /* end of test_transport_api_limited_sockets.c */ |