aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-11-19 10:33:34 +0000
committerRoger Dingledine <arma@torproject.org>2005-11-19 10:33:34 +0000
commit98f353fa7c417aeaa53d391980979f792873d8cb (patch)
tree531c6739a14460279c2e7c1bf9843101c3a0f611 /src/or
parent5c949fce51e15db4b89647b4de25cd83f48485e4 (diff)
downloadtor-98f353fa7c417aeaa53d391980979f792873d8cb.tar
tor-98f353fa7c417aeaa53d391980979f792873d8cb.tar.gz
actually listen when we try to route our dir connection via tor.
svn:r5432
Diffstat (limited to 'src/or')
-rw-r--r--src/or/directory.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index d91a9fdc5..f2c1ba30f 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -163,7 +163,6 @@ directory_get_from_dirserver(uint8_t purpose, const char *resource,
or_options_t *options = get_options();
int fetch_fresh_first = server_mode(options) && options->DirPort != 0;
int directconn = !purpose_is_private(purpose);
- int need_to_use_tor = 0;
int need_v1_support = purpose == DIR_PURPOSE_FETCH_DIR ||
purpose == DIR_PURPOSE_FETCH_RUNNING_LIST;
@@ -202,11 +201,11 @@ directory_get_from_dirserver(uint8_t purpose, const char *resource,
ds = router_pick_trusteddirserver(1, 1, 1,
retry_if_no_servers);
if (!ds)
- need_to_use_tor = 1; /* last resort: try routing it via Tor */
+ directconn = 0; /* last resort: try routing it via Tor */
}
}
}
- if (!directconn || need_to_use_tor) {
+ if (!directconn) {
/* Never use fascistfirewall; we're going via Tor. */
if (purpose == DIR_PURPOSE_FETCH_RENDDESC) {
/* only ask authdirservers, any of them will do */
@@ -228,7 +227,7 @@ directory_get_from_dirserver(uint8_t purpose, const char *resource,
notice(LD_DIR,
"No running dirservers known. Will try again later. (purpose %d)",
purpose);
- if (directconn) {
+ if (!purpose_is_private(purpose)) {
/* remember we tried them all and failed. */
directory_all_unreachable(time(NULL));
}