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

[or-cvs] On systems that don"t have getrlimit (like windows), we wer...



Update of /home2/or/cvsroot/tor/src/common
In directory moria:/home/arma/work/onion/cvs/tor/src/common

Modified Files:
	compat.c 
Log Message:
On systems that don't have getrlimit (like windows), we were artificially
constraining ourselves to a max of 1024 connections. Now if there is no
getrlimit, just assume that we can handle the whole 15000 connections.

The better answer is to find a getrlimit equivalent on Windows, but hey,
one step at a time.


Index: compat.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/common/compat.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -p -d -r1.79 -r1.80
--- compat.c	14 Dec 2005 20:40:39 -0000	1.79
+++ compat.c	23 Jan 2006 23:39:13 -0000	1.80
@@ -450,8 +450,8 @@ set_max_file_descriptors(unsigned long l
 #ifndef HAVE_GETRLIMIT
   log_fn(LOG_INFO, LD_NET,
          "This platform is missing getrlimit(). Proceeding.");
-  if (limit > cap) {
-    log(LOG_INFO, LD_CONFIG, "ConnLimit must be at most %d. Capping it.", cap);
+  if (limit < cap) {
+    log(LOG_INFO, LD_CONFIG, "ConnLimit must be at most %d. Using that.", cap);
     limit = cap;
   }
 #else