aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-12-15 21:39:35 +0000
committerRoger Dingledine <arma@torproject.org>2006-12-15 21:39:35 +0000
commitce51a1d349280394b940082b1a52a7aa41e0f0ec (patch)
treebc5b2263202f43f4c79e38ccc3ca341ee15f007a /src/or/router.c
parentf53a269928105e9c300f764d06132257ebf080e6 (diff)
downloadtor-ce51a1d349280394b940082b1a52a7aa41e0f0ec.tar.gz
tor-ce51a1d349280394b940082b1a52a7aa41e0f0ec.zip
a changelog for write limiting. also, disable the "advertise dirport
until we reach our max bandwidth if it's tiny" trick now that we do the bandwidth self-test on boot. svn:r9134
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 0c3ccafe3d..940f462c5a 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -426,15 +426,12 @@ decide_to_advertise_dirport(or_options_t *options, routerinfo_t *router)
return 0;
if (!check_whether_dirport_reachable())
return 0;
- if (router->bandwidthcapacity >= router->bandwidthrate) {
- /* check if we might potentially hibernate. */
- if (options->AccountingMax != 0)
- return 0;
- /* also check if we're advertising a small amount, and have
- a "boring" DirPort. */
- if (router->bandwidthrate < 50000 && router->dir_port > 1024)
- return 0;
- }
+ /* check if we might potentially hibernate. */
+ if (accounting_is_enabled(options))
+ return 0;
+ /* also check if we're advertising a small amount */
+ if (router->bandwidthrate <= 51200)
+ return 0;
/* Sounds like a great idea. Let's publish it. */
return router->dir_port;