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

[or-cvs] r12925: If the user sets RelayBandwidthRate but doesn't set RelayBan (in tor/trunk: . src/or)



Author: arma
Date: 2007-12-22 04:13:24 -0500 (Sat, 22 Dec 2007)
New Revision: 12925

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/config.c
Log:
If the user sets RelayBandwidthRate but doesn't set
RelayBandwidthBurst, then make them equal rather than erroring out.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-12-22 09:09:43 UTC (rev 12924)
+++ tor/trunk/ChangeLog	2007-12-22 09:13:24 UTC (rev 12925)
@@ -21,6 +21,8 @@
   o Minor features:
     - If BridgeRelay is set to 1, then the default for
       PublishServerDescriptor is now "bridge" rather than "v2,v3".
+    - If the user sets RelayBandwidthRate but doesn't set
+      RelayBandwidthBurst, then make them equal rather than erroring out.
 
 
 Changes in version 0.2.0.13-alpha - 2007-12-21

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-12-22 09:09:43 UTC (rev 12924)
+++ tor/trunk/src/or/config.c	2007-12-22 09:13:24 UTC (rev 12925)
@@ -3016,6 +3016,9 @@
     }
   }
 
+  if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
+    options->RelayBandwidthBurst = options->RelayBandwidthRate;
+
   if (options->RelayBandwidthRate > options->RelayBandwidthBurst)
     REJECT("RelayBandwidthBurst must be at least equal "
            "to RelayBandwidthRate.");