From: Nick Mathewson Date: Tue, 8 Feb 2011 19:37:02 +0000 (-0500) Subject: Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2 X-Git-Tag: tor-0.2.3.1-alpha~136^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d43470ad8a6b82e3d8a5aa0c1beb729fa65859b5;p=thirdparty%2Ftor.git Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2 --- d43470ad8a6b82e3d8a5aa0c1beb729fa65859b5 diff --cc src/or/config.c index 5aca2256ff,a955b1728b..eae92b2408 --- a/src/or/config.c +++ b/src/or/config.c @@@ -3338,16 -3367,15 +3338,21 @@@ options_validate(or_options_t *old_opti if (ensure_bandwidth_cap(&options->RelayBandwidthBurst, "RelayBandwidthBurst", msg) < 0) return -1; + if (ensure_bandwidth_cap(&options->PerConnBWRate, + "PerConnBWRate", msg) < 0) + return -1; + if (ensure_bandwidth_cap(&options->PerConnBWBurst, + "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) { - r = tor_snprintf(buf, sizeof(buf), + tor_asprintf(msg, "BandwidthRate is set to %d bytes/second. " "For servers, it must be at least %d.", (int)options->BandwidthRate,