summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-01-03 20:51:24 +0000
committerNick Mathewson <nickm@torproject.org>2005-01-03 20:51:24 +0000
commit0c4186d6eee21c9fb4929e0fed81853ef7319b9a (patch)
treebbefe9e6e25b0cfd6fdecd335c2376a7b6720fad /src/or/routerlist.c
parent65c4fa26147998954d371ff50bea7106fb769dc9 (diff)
downloadtor-0c4186d6eee21c9fb4929e0fed81853ef7319b9a.tar.gz
tor-0c4186d6eee21c9fb4929e0fed81853ef7319b9a.zip
Use correct logic to decide whether there are more directory servers to retry.
svn:r3257
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 6a68bb96e8..cef59634b0 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -95,7 +95,8 @@ void router_get_trusted_dir_servers(smartlist_t **outp)
*/
routerinfo_t *router_pick_directory_server(int requireothers,
int fascistfirewall,
- int for_runningrouters) {
+ int for_runningrouters,
+ int retry_if_no_servers) {
routerinfo_t *choice;
if (!routerlist)
@@ -103,7 +104,7 @@ routerinfo_t *router_pick_directory_server(int requireothers,
choice = router_pick_directory_server_impl(requireothers, fascistfirewall,
for_runningrouters);
- if (choice)
+ if (choice || !retry_if_no_servers)
return choice;
log_fn(LOG_INFO,"No reachable router entries for dirservers. Trying them all again.");
@@ -128,11 +129,12 @@ routerinfo_t *router_pick_directory_server(int requireothers,
}
trusted_dir_server_t *router_pick_trusteddirserver(int requireothers,
- int fascistfirewall) {
+ int fascistfirewall,
+ int retry_if_no_servers) {
trusted_dir_server_t *choice;
choice = router_pick_trusteddirserver_impl(requireothers, fascistfirewall);
- if (choice)
+ if (choice || !retry_if_no_servers)
return choice;
log_fn(LOG_INFO,"No trusted dirservers are reachable. Trying them all again.");