From 4902ece6989b765f6ab0238168cfb0091ceb0bd1 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 7 Dec 2005 04:43:39 +0000 Subject: what the heck is wrong with this little piece of code? why can none of us get it right? it looks so simple. svn:r5521 --- src/or/circuitbuild.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/or/circuitbuild.c') diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index f542804d20..0acc465714 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1431,9 +1431,9 @@ choose_good_middle_server(uint8_t purpose, } /** Pick a good entry server for the circuit to be built according to - * state. Don't reuse a chosen exit (if any), don't use this router - * (if we're an OR), and respect firewall settings; if we're using helper nodes, - * return one. + * state. Don't reuse a chosen exit (if any), don't use this + * router (if we're an OR), and respect firewall settings; if we're + * using helper nodes, return one. * * If state is NULL, we're choosing entries to serve as helper nodes, * not for any particular circuit. @@ -1468,6 +1468,8 @@ choose_good_entry_server(cpath_build_state_t *state) smartlist_add(excluded, r); } } + // XXX we should exclude busy exit nodes here, too, + // but only if there are enough other nodes available. choice = router_choose_random_node(options->EntryNodes, options->ExcludeNodes, excluded, state ? state->need_uptime : 1, state ? state->need_capacity : 0, -- cgit v1.2.3-54-g00ecf