diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-06-25 00:29:31 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-06-25 00:29:31 +0000 |
commit | 76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7 (patch) | |
tree | 8b833310f12954d9ebf61d267c61f87c7481afbf /src/or/main.c | |
parent | e9b882554e44641011e3ee5be26e7cc200f3dd71 (diff) | |
download | tor-76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7.tar.gz tor-76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7.zip |
Remaining 008pre1 items done; deferred where more design is needed.
More docs and (way more!) testing needed.
Done:
- Authdirservers down directories from others.
- Generate and use running-routers lists
- Cache directories; store across reboots.
- Refactor directory parsing a bit; note potential trouble spots.
svn:r1985
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c index 983e9a34dd..99e83f37cd 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -451,9 +451,8 @@ static void run_scheduled_events(time_t now) { router_rebuild_descriptor(); router_upload_dir_desc_to_dirservers(); } - if(!options.DirPort) { - /* NOTE directory servers do not currently fetch directories. - * Hope this doesn't bite us later. */ + if(!options.DirPort || !options.AuthoritativeDir) { + /* XXXX should directories do this next part too? */ routerlist_remove_old_routers(); /* purge obsolete entries */ directory_get_from_dirserver(DIR_PURPOSE_FETCH_DIR, NULL, 0); } else { @@ -461,6 +460,8 @@ static void run_scheduled_events(time_t now) { dirserv_remove_old_servers(); /* dirservers try to reconnect too, in case connections have failed */ router_retry_connections(); + /* fetch another directory, in case it knows something we don't */ + directory_get_from_dirserver(DIR_PURPOSE_FETCH_DIR, NULL, 0); } /* Force an upload of our descriptors every DirFetchPostPeriod seconds. */ rend_services_upload(1); |