diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-09-07 11:22:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-09-07 11:22:24 -0400 |
commit | 947012e153e76ceb8015ea426a895f21b63cd677 (patch) | |
tree | 81f5f97b40b4e4824a8b6894e3ba345ac3ca15f6 | |
parent | 9ef2cd7776ecb91b74c1db58d8fbd9111238f458 (diff) | |
parent | 3b02a959b32c1664a2a62b36badda343cca1bc6a (diff) | |
download | tor-947012e153e76ceb8015ea426a895f21b63cd677.tar.gz tor-947012e153e76ceb8015ea426a895f21b63cd677.zip |
Merge remote-tracking branch 'public/bug3851'
-rw-r--r-- | changes/bug3851 | 4 | ||||
-rw-r--r-- | src/or/microdesc.c | 9 | ||||
-rw-r--r-- | src/or/networkstatus.c | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/changes/bug3851 b/changes/bug3851 new file mode 100644 index 0000000000..91572f031b --- /dev/null +++ b/changes/bug3851 @@ -0,0 +1,4 @@ + o Minor bugfixes: + - Make 'FetchUselessDescriptors' cause all descriptor types and + all consensus types get fetched. Fixes bug 3851; bugfix on + 0.2.3.1-alpha. diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 627fad58e1..510b2f40f7 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -698,8 +698,9 @@ we_use_microdescriptors_for_circuits(const or_options_t *options) int ret = options->UseMicrodescriptors; if (ret == -1) { /* UseMicrodescriptors is "auto"; we need to decide: */ - /* So we decide that we'll use microdescriptors iff we are not a server */ - ret = ! server_mode(options); + /* So we decide that we'll use microdescriptors iff we are not a server, + * and we're not autofetching everything. */ + ret = !server_mode(options) && !options->FetchUselessDescriptors; } return ret; } @@ -710,6 +711,8 @@ we_fetch_microdescriptors(const or_options_t *options) { if (directory_caches_dir_info(options)) return 1; + if (options->FetchUselessDescriptors) + return 1; return we_use_microdescriptors_for_circuits(options); } @@ -719,6 +722,8 @@ we_fetch_router_descriptors(const or_options_t *options) { if (directory_caches_dir_info(options)) return 1; + if (options->FetchUselessDescriptors) + return 1; return ! we_use_microdescriptors_for_circuits(options); } diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 868c2a2a72..398f041532 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1187,6 +1187,10 @@ we_want_to_fetch_flavor(const or_options_t *options, int flavor) * it ourselves. */ return 1; } + if (options->FetchUselessDescriptors) { + /* In order to get all descriptors, we need to fetch all consensuses. */ + return 1; + } /* Otherwise, we want the flavor only if we want to use it to build * circuits. */ return flavor == usable_consensus_flavor(); |