summaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_limited_sockets.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-14 11:59:46 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-14 11:59:46 +0000
commit1fe79fd553e21a20206301c18568d30158c9dd46 (patch)
tree3db4e42adb872d1e8aa792643c341a14b2959736 /src/transport/test_transport_api_limited_sockets.c
parentf709218364f7d40e5a13938886514e866602715d (diff)
indentation
Diffstat (limited to 'src/transport/test_transport_api_limited_sockets.c')
-rw-r--r--src/transport/test_transport_api_limited_sockets.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c
index 0dc6c2a86..9e7bdb9b6 100644
--- a/src/transport/test_transport_api_limited_sockets.c
+++ b/src/transport/test_transport_api_limited_sockets.c
@@ -284,6 +284,7 @@ main (int argc, char *argv[])
{
int ret = 0;
int nat_res;
+
test_plugin = NULL;
GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);
@@ -299,8 +300,9 @@ main (int argc, char *argv[])
#endif
NULL);
- if ((test_plugin != NULL) && ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0)))
+ if ((test_plugin != NULL) &&
+ ((strcmp (test_plugin, "tcp_nat") == 0) ||
+ (strcmp (test_plugin, "udp_nat") == 0)))
{
nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
if (GNUNET_NO == nat_res)
@@ -329,13 +331,17 @@ main (int argc, char *argv[])
struct rlimit r_file_old;
struct rlimit r_file_new;
int res;
- res = getrlimit(RLIMIT_NOFILE, &r_file_old);
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Maximum number of open files was: %u/%u\n", r_file_old.rlim_cur, r_file_old.rlim_max);
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Setting maximum number of open files to: %u\n", MAX_FILES);
+ res = getrlimit (RLIMIT_NOFILE, &r_file_old);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Maximum number of open files was: %u/%u\n", r_file_old.rlim_cur,
+ r_file_old.rlim_max);
+
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Setting maximum number of open files to: %u\n", MAX_FILES);
r_file_new.rlim_cur = MAX_FILES;
r_file_new.rlim_max = r_file_old.rlim_max;
- res = setrlimit(RLIMIT_NOFILE, &r_file_new);
+ res = setrlimit (RLIMIT_NOFILE, &r_file_new);
if (res != 0)
{
@@ -360,8 +366,9 @@ main (int argc, char *argv[])
GNUNET_free (test_name);
#if HAVE_SETRLIMIT
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Restoring previous value maximum number of open files\n");
- res = setrlimit(RLIMIT_NOFILE, &r_file_old);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Restoring previous value maximum number of open files\n");
+ res = setrlimit (RLIMIT_NOFILE, &r_file_old);
if (res != 0)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Restoring limit failed!\n");