summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2014-07-24 16:30:50 -0400
committerRoger Dingledine <arma@torproject.org>2014-07-24 16:30:50 -0400
commiteb3e0e3da300f6c7c4e04386de872b4949a9baaf (patch)
treef37a657ee3637fdab3be0ee3280285a3911381bb /src/or/dirserv.c
parentbc9866e13ff140b237b0560a784bb72bff67a8e3 (diff)
parenta57c07b21098da4a97d586ffdedca71babe4daaa (diff)
downloadtor-eb3e0e3da300f6c7c4e04386de872b4949a9baaf.tar.gz
tor-eb3e0e3da300f6c7c4e04386de872b4949a9baaf.zip
Merge branch 'maint-0.2.5'
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index a033f8be6d..f72f19f025 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1588,7 +1588,7 @@ dirserv_compute_performance_thresholds(routerlist_t *rl,
/* (Now bandwidths is sorted.) */
if (fast_bandwidth_kb < ROUTER_REQUIRED_MIN_BANDWIDTH/(2 * 1000))
fast_bandwidth_kb = bandwidths_kb[n_active/4];
- guard_bandwidth_including_exits_kb = bandwidths_kb[(n_active-1)/2];
+ guard_bandwidth_including_exits_kb = bandwidths_kb[n_active*3/4];
guard_tk = find_nth_long(tks, n_active, n_active/8);
}
@@ -1646,7 +1646,8 @@ dirserv_compute_performance_thresholds(routerlist_t *rl,
if (n_active_nonexit) {
guard_bandwidth_excluding_exits_kb =
- median_uint32(bandwidths_excluding_exits_kb, n_active_nonexit);
+ find_nth_uint32(bandwidths_excluding_exits_kb,
+ n_active_nonexit, n_active_nonexit*3/4);
}
log_info(LD_DIRSERV,