From 5c51b3f1f0d4c394392aa6fce89bbe0960117771 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 10 Sep 2012 15:23:39 -0400 Subject: 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. --- src/or/nodelist.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/or/nodelist.c') 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)) -- cgit v1.2.3-54-g00ecf