aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-11-12 12:05:27 -0500
committerNick Mathewson <nickm@torproject.org>2011-05-05 20:54:13 -0400
commit711100c5971f5e14e741cca0ad52c85201383830 (patch)
treea8ab4ea814071ad5c1c598cb9d377c843e65e80f /src/or/main.c
parent4cc348e896f74a4e02ef15a77d22fc636b08afae (diff)
downloadtor-711100c5971f5e14e741cca0ad52c85201383830.tar.gz
tor-711100c5971f5e14e741cca0ad52c85201383830.zip
Move dummy authority.z fetch out of update_router_descriptor_downloads
To make sure that a server learns if its IP has changed, the server sometimes launches authority.z descriptor fetches from update_router_descriptor_downloads. That's nice, but we're moving towards a situation where update_router_descriptor_downloads doesn't always get called. So this patch breaks the authority.z check-and-fetch into a new function. This function also renames last_routerdesc_download to a more appropriate last_descriptor_download, and adds a new update_all_descriptor_downloads() function. (For now, this is unnecessary, since servers don't actually use microdescriptors. But that could change, or bridges could start using microdescriptors, and then we'll be glad this is refactored nicely.)
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 496164ade7..0e866b7307 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -872,13 +872,11 @@ directory_info_has_arrived(time_t now, int from_cache)
log(quiet ? LOG_INFO : LOG_NOTICE, LD_DIR,
"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);
+ update_all_descriptor_downloads(now);
return;
} else {
if (directory_fetches_from_authorities(options)) {
- update_router_descriptor_downloads(now);
- update_microdesc_downloads(now);
+ update_all_descriptor_downloads(now);
}
/* if we have enough dir info, then update our guard status with
@@ -1110,9 +1108,8 @@ run_scheduled_events(time_t now)
}
if (time_to_try_getting_descriptors < now) {
- update_router_descriptor_downloads(now);
+ update_all_descriptor_downloads(now);
update_extrainfo_downloads(now);
- update_microdesc_downloads(now);
if (options->UseBridges)
fetch_bridge_descriptors(options, now);
if (router_have_minimum_dir_info())