aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-09-10 15:23:39 -0400
committerNick Mathewson <nickm@torproject.org>2012-12-06 11:23:43 -0500
commit5c51b3f1f0d4c394392aa6fce89bbe0960117771 (patch)
tree8c4c512f91e3d5e22ab246205f6030684a33b4d6 /src/or/directory.c
parent404e3dd48149434a22c6b27bc253afd78ce5a9bf (diff)
downloadtor-5c51b3f1f0d4c394392aa6fce89bbe0960117771.tar.gz
tor-5c51b3f1f0d4c394392aa6fce89bbe0960117771.zip
Start refactoring trusted_dir_servers into trusted and fallback lists
We use trusted_dir_server_t for two pieces of functionality: a list of all directory authorities, and a list of initial places to look for a directory. With this patch we start to separate those two roles. There is as of now no actual way to be a fallback directory without being an authority.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index c7fb0c4fb9..14b67d89a1 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -474,7 +474,7 @@ directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose,
if (!rs) {
log_info(LD_DIR, "No router found for %s; falling back to "
"dirserver list.", dir_conn_purpose_to_string(dir_purpose));
- rs = router_pick_trusteddirserver(type, pds_flags);
+ rs = router_pick_fallback_dirserver(type, pds_flags);
if (!rs)
get_via_tor = 1; /* last resort: try routing it via Tor */
}
@@ -1665,7 +1665,7 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
conn->base_.port);
if ((rs = router_get_mutable_consensus_status_by_id(id_digest)))
rs->last_dir_503_at = now;
- if ((ds = router_get_trusteddirserver_by_digest(id_digest)))
+ if ((ds = router_get_fallback_dirserver_by_digest(id_digest)))
ds->fake_status.last_dir_503_at = now;
tor_free(body); tor_free(headers); tor_free(reason);
@@ -3603,7 +3603,7 @@ dir_networkstatus_download_failed(smartlist_t *failed, int status_code)
escaped(fp));
continue;
}
- dir = router_get_trusteddirserver_by_digest(digest);
+ dir = router_get_fallback_dirserver_by_digest(digest);
if (dir)
download_status_failed(&dir->v2_ns_dl_status, status_code);