[or-cvs] i imagine it will confuse users that they can set maxconn

Roger Dingledine arma at seul.org
Fri Jan 28 08:44:12 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 main.c 
Log Message:
i imagine it will confuse users that they can set maxconn
to 14999 but a round number like 15000 is right out.


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.286.2.4
retrieving revision 1.286.2.5
diff -u -d -r1.286.2.4 -r1.286.2.5
--- config.c	28 Jan 2005 06:28:43 -0000	1.286.2.4
+++ config.c	28 Jan 2005 08:44:10 -0000	1.286.2.5
@@ -1311,8 +1311,8 @@
   }
 #endif
 
-  if (options->MaxConn >= MAXCONNECTIONS) {
-    log(LOG_WARN, "MaxConn option must be less than %d in Tor 0.0.9.x.", MAXCONNECTIONS);
+  if (options->MaxConn > MAXCONNECTIONS) {
+    log(LOG_WARN, "MaxConn option must be at most %d.", MAXCONNECTIONS);
     result = -1;
   }
 

Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.407.2.5
retrieving revision 1.407.2.6
diff -u -d -r1.407.2.5 -r1.407.2.6
--- main.c	27 Jan 2005 06:58:59 -0000	1.407.2.5
+++ main.c	28 Jan 2005 08:44:10 -0000	1.407.2.6
@@ -41,11 +41,11 @@
 
 /** Array of all open connections; each element corresponds to the element of
  * poll_array in the same position.  The first nfds elements are valid. */
-static connection_t *connection_array[MAXCONNECTIONS] =
+static connection_t *connection_array[MAXCONNECTIONS+1] =
         { NULL };
 
 /** Array of pollfd objects for calls to poll(). */
-static struct pollfd poll_array[MAXCONNECTIONS];
+static struct pollfd poll_array[MAXCONNECTIONS+1];
 
 static int nfds=0; /**< Number of connections currently active. */
 



More information about the tor-commits mailing list