summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-02-08 14:37:02 -0500
committerNick Mathewson <nickm@torproject.org>2011-02-08 14:37:02 -0500
commitd43470ad8a6b82e3d8a5aa0c1beb729fa65859b5 (patch)
tree549b5fee5f5749a36dbe3efdcc0d666b18928e5b /src/or/config.c
parent9c7e2cf010856aabfbca042870ec1d5718c30ea4 (diff)
parentbcbcda309a24ebe9022ad47c023af12877535780 (diff)
downloadtor-d43470ad8a6b82e3d8a5aa0c1beb729fa65859b5.tar.gz
tor-d43470ad8a6b82e3d8a5aa0c1beb729fa65859b5.zip
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 5aca2256ff..eae92b2408 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3345,6 +3345,11 @@ options_validate(or_options_t *old_options, or_options_t *options,
"PerConnBWBurst", 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) {
tor_asprintf(msg,
@@ -3373,9 +3378,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
}
}
- if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
- options->RelayBandwidthBurst = options->RelayBandwidthRate;
-
if (options->RelayBandwidthRate > options->RelayBandwidthBurst)
REJECT("RelayBandwidthBurst must be at least equal "
"to RelayBandwidthRate.");