summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-05-11 17:20:33 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-27 18:04:44 -0400
commit3a492d31d5c50ef3b766881ae1d765c296d55797 (patch)
treec4ae30aa130eb1ed56c38cae719d15dc4f09e7b2 /src/or/main.c
parente34d0d3365f5263d2888d63a4d58dc479f191565 (diff)
downloadtor-3a492d31d5c50ef3b766881ae1d765c296d55797.tar.gz
tor-3a492d31d5c50ef3b766881ae1d765c296d55797.zip
Download microdescriptors if you're a cache
This commit adds some functions to see what microdescriptors we're missing, and adds fetch-microdesc/store-microdesc logic to the directory code.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c
index adc2d3dae3..8ea1728fb7 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -851,10 +851,13 @@ directory_info_has_arrived(time_t now, int from_cache)
"I learned some more directory information, but not enough to "
"build a circuit: %s", get_dir_info_status_string());
update_router_descriptor_downloads(now);
+ update_microdesc_downloads(now);
return;
} else {
- if (directory_fetches_from_authorities(options))
+ if (directory_fetches_from_authorities(options)) {
update_router_descriptor_downloads(now);
+ update_microdesc_downloads(now);
+ }
/* if we have enough dir info, then update our guard status with
* whatever we just learned. */
@@ -1062,6 +1065,7 @@ run_scheduled_events(time_t now)
if (time_to_try_getting_descriptors < now) {
update_router_descriptor_downloads(now);
update_extrainfo_downloads(now);
+ update_microdesc_downloads(now);
if (options->UseBridges)
fetch_bridge_descriptors(now);
if (router_have_minimum_dir_info())