[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] backport the ConnLimit fix



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