aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-10-17 21:51:20 +0000
committerRoger Dingledine <arma@torproject.org>2004-10-17 21:51:20 +0000
commit97a0a435114e99e14dafa9f6ee72df644254b460 (patch)
treed47de4e5a5cbfe9d5450706d66a554d7d776228b /src/or/routerlist.c
parent640544ae3e6d6e8b576327442c98750359eccbf6 (diff)
downloadtor-97a0a435114e99e14dafa9f6ee72df644254b460.tar
tor-97a0a435114e99e14dafa9f6ee72df644254b460.tar.gz
start the process of making 0.0.7* obsolete
svn:r2565
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 39e51687f..0eeda7b58 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -423,9 +423,8 @@ routerlist_sl_choose_by_bandwidth(smartlist_t *sl)
bandwidths = smartlist_create();
for (i = 0; i < smartlist_len(sl); ++i) {
router = smartlist_get(sl, i);
- /* give capacity a default, until 0.0.7 is obsolete */
- tmp = (router->bandwidthcapacity == 0) ? 200000 : router->bandwidthcapacity;
- this_bw = (tmp < router->bandwidthrate) ? tmp : router->bandwidthrate;
+ this_bw = (router->bandwidthcapacity < router->bandwidthrate) ?
+ router->bandwidthcapacity : router->bandwidthrate;
if(this_bw > 800000)
this_bw = 800000; /* if they claim something huge, don't believe it */
p = tor_malloc(sizeof(uint32_t));