summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-07-28 18:19:57 -0400
committerRoger Dingledine <arma@torproject.org>2009-07-28 18:19:57 -0400
commite8e88922a789e3317c881521110bfa9a7bdce597 (patch)
tree58180b8ab702ae5968135f8727065c7b3baea84a /src/or/router.c
parent7b716878cb6837756bd65ed788e5d8d89d8af56c (diff)
parent69706f99e80aec9414e6a54e76346d4cf89f1a4c (diff)
downloadtor-e8e88922a789e3317c881521110bfa9a7bdce597.tar.gz
tor-e8e88922a789e3317c881521110bfa9a7bdce597.zip
Merge branch 'maint-0.2.1' into master
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 42a0d56471..82db142057 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -570,7 +570,7 @@ init_keys(void)
/* 5. Dump fingerprint to 'fingerprint' */
keydir = get_datadir_fname("fingerprint");
log_info(LD_GENERAL,"Dumping fingerprint to \"%s\"...",keydir);
- if (crypto_pk_get_fingerprint(get_identity_key(), fingerprint, 1)<0) {
+ if (crypto_pk_get_fingerprint(get_identity_key(), fingerprint, 0)<0) {
log_err(LD_GENERAL,"Error computing fingerprint");
tor_free(keydir);
return -1;
@@ -1302,18 +1302,10 @@ router_rebuild_descriptor(int force)
ri->platform = tor_strdup(platform);
/* compute ri->bandwidthrate as the min of various options */
- ri->bandwidthrate = (int)options->BandwidthRate;
- if (ri->bandwidthrate > options->MaxAdvertisedBandwidth)
- ri->bandwidthrate = (int)options->MaxAdvertisedBandwidth;
- if (options->RelayBandwidthRate > 0 &&
- ri->bandwidthrate > options->RelayBandwidthRate)
- ri->bandwidthrate = (int)options->RelayBandwidthRate;
+ ri->bandwidthrate = get_effective_bwrate(options);
/* and compute ri->bandwidthburst similarly */
- ri->bandwidthburst = (int)options->BandwidthBurst;
- if (options->RelayBandwidthBurst > 0 &&
- ri->bandwidthburst > options->RelayBandwidthBurst)
- ri->bandwidthburst = (int)options->RelayBandwidthBurst;
+ ri->bandwidthburst = get_effective_bwburst(options);
ri->bandwidthcapacity = hibernating ? 0 : rep_hist_bandwidth_assess();