summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-15 23:15:24 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-15 23:15:24 +0000
commit3ad6dc0e2e91e094e082e767c71e6e1d91f5fca0 (patch)
treee0a42cb1c2dbd0f12509c7aad3292182c4c27887 /src/or/main.c
parent95f6265a790a1a56ff284bbc8eb55e56583dada3 (diff)
downloadtor-3ad6dc0e2e91e094e082e767c71e6e1d91f5fca0.tar.gz
tor-3ad6dc0e2e91e094e082e767c71e6e1d91f5fca0.zip
r15806@catbus: nickm | 2007-10-15 19:14:57 -0400
Implement v3 networkstatus client code. Remove v2 networkstatus client code, except as needed for caches to fetch and serve v2 networkstatues and the routers they list. svn:r11957
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 8c12c70992..9e289fd15a 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -995,9 +995,10 @@ run_scheduled_events(time_t now)
* update all the descriptors' running status. */
/* purge obsolete entries */
routerlist_remove_old_routers();
- networkstatus_list_clean(now);
- networkstatus_list_update_recent(now);
- routers_update_all_from_networkstatus(now);
+ networkstatus_v2_list_clean(now);
+#if 0
+ networkstatus_v2_list_update_recent(now);
+#endif
/* Also, once per minute, check whether we want to download any
* networkstatus documents.
@@ -1339,6 +1340,14 @@ do_main_loop(void)
stats_prev_global_read_bucket = global_read_bucket;
stats_prev_global_write_bucket = global_write_bucket;
+ if (trusted_dirs_reload_certs())
+ return -1;
+ if (router_reload_v2_networkstatus()) {
+ return -1;
+ }
+ if (router_reload_consensus_networkstatus()) {
+ return -1;
+ }
/* load the routers file, or assign the defaults. */
if (router_reload_router_list()) {
return -1;
@@ -1346,12 +1355,6 @@ do_main_loop(void)
/* load the networkstatuses. (This launches a download for new routers as
* appropriate.)
*/
- if (router_reload_networkstatus()) {
- return -1;
- }
- if (router_reload_consensus_networkstatus()) {
- return -1;
- }
now = time(NULL);
directory_info_has_arrived(now, 1);