[or-cvs] various fixes

Roger Dingledine arma at seul.org
Tue Nov 9 01:24:00 UTC 2004


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

Modified Files:
	config.c control.c hibernate.c 
Log Message:
various fixes


Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -d -r1.215 -r1.216
--- config.c	8 Nov 2004 23:12:40 -0000	1.215
+++ config.c	9 Nov 2004 01:23:52 -0000	1.216
@@ -191,9 +191,9 @@
   return global_options;
 }
 
-/** Change the current global options tocontain <b>new</b> instead of
- * their current value; free the old value as necessary.  Where
- * <b>new</b> is different from the old value, update the process to
+/** Change the current global options to contain <b>new_val</b> instead
+ * of their current value; free the old value as necessary.  Where
+ * <b>new_val</b> is different from the old value, update the process to
  * use the new value instead.
  *
  * Note 1: <b>new_val</b> must have previously been validated with
@@ -1040,6 +1040,11 @@
     result = -1;
   }
 
+  if (2*options->BandwidthRateBytes >= options->BandwidthBurstBytes) {
+    log(LOG_WARN,"BandwidthBurstBytes must be more than twice BandwidthRateBytes.");
+    result = -1;
+  }
+
   if (options->AccountingStart < 0 || options->AccountingStart > 31) {
     log(LOG_WARN,"Monthly accounting must start on a day of the month, and no months have %d days.",
         options->AccountingStart);

Index: control.c
===================================================================
RCS file: /home/or/cvsroot/src/or/control.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- control.c	7 Nov 2004 23:11:29 -0000	1.13
+++ control.c	9 Nov 2004 01:23:58 -0000	1.14
@@ -51,7 +51,7 @@
 #define ERR_UNAUTHORIZED            0x0007
 #define ERR_REJECTED_AUTHENTICATION 0x0008
 
-/* Recongized asynchonous event types. */
+/* Recognized asynchronous event types. */
 #define _EVENT_MIN            0x0001
 #define EVENT_CIRCUIT_STATUS  0x0001
 #define EVENT_STREAM_STATUS   0x0002
@@ -77,7 +77,7 @@
 /** Bitfield: The bit 1&lt;&lt;e is set if <b>any</b> open control
  * connection is interested in events of type <b>e</b>.  We use this
  * so that we can decide to skip generating event messages that nobody
- * is interest in without having to walk over the global connection
+ * has interest in without having to walk over the global connection
  * list to find out.
  **/
 static uint32_t global_event_mask = 0;

Index: hibernate.c
===================================================================
RCS file: /home/or/cvsroot/src/or/hibernate.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- hibernate.c	7 Nov 2004 23:14:47 -0000	1.9
+++ hibernate.c	9 Nov 2004 01:23:58 -0000	1.10
@@ -545,7 +545,6 @@
  * to start/stop hibernating.
  */
 void consider_hibernation(time_t now) {
-  connection_t *conn;
 
   /* If we're in 'exiting' mode, then we just shutdown after the interval
    * elapses. */



More information about the tor-commits mailing list