|
@@ -191,9 +191,9 @@ get_options(void) {
|
|
|
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 @@ options_validate(or_options_t *options)
|
|
|
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);
|