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/config.c | |
parent | 404e3dd48149434a22c6b27bc253afd78ce5a9bf (diff) | |
download | tor-5c51b3f1f0d4c394392aa6fce89bbe0960117771.tar tor-5c51b3f1f0d4c394392aa6fce89bbe0960117771.tar.gz |
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/config.c')
-rw-r--r-- | src/or/config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c index 75f619335..995d90162 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -854,7 +854,8 @@ consider_adding_dir_authorities(const or_options_t *options, { config_line_t *cl; int need_to_update = - !smartlist_len(router_get_trusted_dir_servers()) || !old_options || + !smartlist_len(router_get_trusted_dir_servers()) || + !smartlist_len(router_get_fallback_dir_servers()) || !old_options || !config_lines_eq(options->DirServers, old_options->DirServers) || !config_lines_eq(options->AlternateBridgeAuthority, old_options->AlternateBridgeAuthority) || @@ -867,7 +868,7 @@ consider_adding_dir_authorities(const or_options_t *options, return 0; /* all done */ /* Start from a clean slate. */ - clear_trusted_dir_servers(); + clear_dir_servers(); if (!options->DirServers) { /* then we may want some of the defaults */ |