diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-10 15:23:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-12-06 11:23:43 -0500 |
commit | 5c51b3f1f0d4c394392aa6fce89bbe0960117771 (patch) | |
tree | 8c4c512f91e3d5e22ab246205f6030684a33b4d6 /src/or/nodelist.c | |
parent | 404e3dd48149434a22c6b27bc253afd78ce5a9bf (diff) | |
download | tor-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/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 95345fb262..460a141f1e 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -1167,6 +1167,11 @@ router_set_status(const char *digest, int up) node_t *node; tor_assert(digest); + SMARTLIST_FOREACH(router_get_fallback_dir_servers(), + trusted_dir_server_t *, d, + if (tor_memeq(d->digest, digest, DIGEST_LEN)) + d->is_running = up); + SMARTLIST_FOREACH(router_get_trusted_dir_servers(), trusted_dir_server_t *, d, if (tor_memeq(d->digest, digest, DIGEST_LEN)) |