[or-cvs] backport the ConnLimit fix

arma at seul.org arma at seul.org
Mon Jan 23 23:42:04 UTC 2006


Update of /home/or/cvsroot/tor/src/common
In directory moria:/home/arma/work/onion/tor-010x/tor/src/common

Modified Files:
      Tag: tor-0_1_0-patches
	compat.c 
Log Message:
backport the ConnLimit fix


Index: compat.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/compat.c,v
retrieving revision 1.47.2.1
retrieving revision 1.47.2.2
diff -u -p -d -r1.47.2.1 -r1.47.2.2
--- compat.c	7 Jun 2005 18:04:37 -0000	1.47.2.1
+++ compat.c	23 Jan 2006 23:42:02 -0000	1.47.2.2
@@ -367,8 +367,8 @@ int
 set_max_file_descriptors(unsigned long limit, unsigned long cap) {
 #ifndef HAVE_GETRLIMIT
   log_fn(LOG_INFO,"This platform is missing getrlimit(). Proceeding.");
-  if (limit > cap) {
-    log(LOG_INFO, "ConnLimit must be at most %d. Capping it.", cap);
+  if (limit < cap) {
+    log(LOG_INFO, "ConnLimit must be at most %d. Using that.", cap);
     limit = cap;
   }
 #else



More information about the tor-commits mailing list