[or-cvs] prepare for letting people set MaxConn above 1024

Roger Dingledine arma at seul.org
Fri Jan 28 06:28:45 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/0091/tor/src/or

Modified Files:
      Tag: tor-0_0_9-patches
	config.c or.h 
Log Message:
prepare for letting people set MaxConn above 1024


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.286.2.3
retrieving revision 1.286.2.4
diff -u -d -r1.286.2.3 -r1.286.2.4
--- config.c	5 Jan 2005 06:09:09 -0000	1.286.2.3
+++ config.c	28 Jan 2005 06:28:43 -0000	1.286.2.4
@@ -1304,8 +1304,15 @@
     result = -1;
   }
 
+#ifdef USE_FAKE_POLL
+  if (options->MaxConn > 1024) {
+    log(LOG_WARN, "Systems without a working poll() can't set MaxConn higher than 1024 in Tor 0.0.9.x.");
+    result = -1;
+  }
+#endif
+
   if (options->MaxConn >= MAXCONNECTIONS) {
-    log(LOG_WARN, "MaxConn option must be less than %d.", MAXCONNECTIONS);
+    log(LOG_WARN, "MaxConn option must be less than %d in Tor 0.0.9.x.", MAXCONNECTIONS);
     result = -1;
   }
 

Index: or.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.508.2.8
retrieving revision 1.508.2.9
diff -u -d -r1.508.2.8 -r1.508.2.9
--- or.h	28 Jan 2005 06:07:54 -0000	1.508.2.8
+++ or.h	28 Jan 2005 06:28:43 -0000	1.508.2.9
@@ -125,7 +125,7 @@
 
 /** Upper bound on maximum simultaneous connections; can be lowered by
  * config file. */
-#define MAXCONNECTIONS 10000
+#define MAXCONNECTIONS 15000
 
 #define DEFAULT_BANDWIDTH_OP (1024 * 1000)
 #define MAX_NICKNAME_LEN 19



More information about the tor-commits mailing list