summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-02-07 23:22:45 -0500
committerRoger Dingledine <arma@torproject.org>2011-02-07 23:22:45 -0500
commitbcbcda309a24ebe9022ad47c023af12877535780 (patch)
treeed368a30c0466f9d938fd3a878585f3b8edcfaf8
parent20b75989acb457e5a2f931f8ad74517f885940ed (diff)
downloadtor-bcbcda309a24ebe9022ad47c023af12877535780.tar.gz
tor-bcbcda309a24ebe9022ad47c023af12877535780.zip
move the clause above the "if bw is too low" check
-rw-r--r--src/or/config.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 8066a23a4a..a955b1728b 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3368,6 +3368,11 @@ options_validate(or_options_t *old_options, or_options_t *options,
"RelayBandwidthBurst", msg) < 0)
return -1;
+ if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
+ options->RelayBandwidthBurst = options->RelayBandwidthRate;
+ if (options->RelayBandwidthBurst && !options->RelayBandwidthRate)
+ options->RelayBandwidthRate = options->RelayBandwidthBurst;
+
if (server_mode(options)) {
if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH) {
r = tor_snprintf(buf, sizeof(buf),
@@ -3399,11 +3404,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
}
}
- if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
- options->RelayBandwidthBurst = options->RelayBandwidthRate;
- if (options->RelayBandwidthBurst && !options->RelayBandwidthRate)
- options->RelayBandwidthRate = options->RelayBandwidthBurst;
-
if (options->RelayBandwidthRate > options->RelayBandwidthBurst)
REJECT("RelayBandwidthBurst must be at least equal "
"to RelayBandwidthRate.");