From 4fa8c39d6ad5e78c74906156a187a4d82673cd53 Mon Sep 17 00:00:00 2001
From: Travis Glenn Hansen <travisghansen@yahoo.com>
Date: Thu, 17 May 2012 23:18:19 -0600
Subject: [PATCH] adjusting debugging

---
 fanout.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/fanout.c b/fanout.c
index d3f96e3..660a8a5 100644
--- a/fanout.c
+++ b/fanout.c
@@ -276,12 +276,12 @@ int main (int argc, char *argv[])
         exit (EXIT_FAILURE);
     }
 
-    getrlimit (RLIMIT_NOFILE,&s_rlimit);
 
+    getrlimit (RLIMIT_NOFILE,&s_rlimit);
 /*
-    i_rlimit.rlim_cur = 5; //rlim_cur is larger than rlim_max .EINVAL error
+    i_rlimit.rlim_cur = 4; //rlim_cur is larger than rlim_max .EINVAL error
     i_rlimit.rlim_max = 512;
-    if(setrlimit (RLIMIT_NOFILE,&r_limit) == -1)
+    if(setrlimit (RLIMIT_NOFILE,&i_rlimit) == -1)
         fanout_error ("ERROR setting rlimit");
 */
 
@@ -294,7 +294,7 @@ int main (int argc, char *argv[])
         client_limit--;
     }
 
-    fanout_debug (3, "max client connections: %d\n", client_limit);
+    fanout_debug (2, "max client connections: %d\n", client_limit);
 
     while (1) {
         fanout_debug (3, "server waiting for new activity\n");
@@ -303,8 +303,6 @@ int main (int argc, char *argv[])
         // Wait indefinitely for read events
         res = select (max+1, &tempset, NULL, NULL, NULL);
 
-        fanout_debug (1, "res: %d\n", res);
-
         if (res < 0) {
             fanout_debug (1, "something bad happened\n");
             continue;
-- 
GitLab