diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-15 09:38:17 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-15 09:38:17 +0000 |
commit | dbd4dadff7dc7734d86feef626cc791120a75f69 (patch) | |
tree | c2229f76bd51fe4b46d8cf5479c3a8815ba0d53b /src/or | |
parent | 50c15943a28934a7977908ed91c27b7644d5fd92 (diff) | |
download | tor-dbd4dadff7dc7734d86feef626cc791120a75f69.tar.gz tor-dbd4dadff7dc7734d86feef626cc791120a75f69.zip |
Authoritative dirservers now also cache the directory, since
they weren't writing anything into their datadirectory, so
when they stop and start, they would know nothing until they
fetched a directory from another authdirserver.
svn:r2891
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/dirserv.c | 1 | ||||
-rw-r--r-- | src/or/routerparse.c | 16 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 3902929341..f2946f9082 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -713,7 +713,6 @@ void dirserv_set_cached_directory(const char *directory, time_t when, { time_t now; cached_dir_t *d; - tor_assert(!get_options()->AuthoritativeDir); now = time(NULL); d = is_running_routers ? &cached_runningrouters : &cached_directory; if (when<=d->published) { diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 1beb8d5997..5c2cd28f82 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -387,11 +387,9 @@ router_parse_routerlist_from_directory(const char *str, goto err; } - if(!get_options()->AuthoritativeDir) { - /* Now that we know the signature is okay, and we have a - * publication time, cache the directory. */ - dirserv_set_cached_directory(str, published_on, 0); - } + /* Now that we know the signature is okay, and we have a + * publication time, cache the directory. */ + dirserv_set_cached_directory(str, published_on, 0); if (!(tok = find_first_by_keyword(tokens, K_RECOMMENDED_SOFTWARE))) { log_fn(LOG_WARN, "Missing recommended-software line from directory."); @@ -515,11 +513,9 @@ router_parse_runningrouters(const char *str) goto err; } - if(!get_options()->AuthoritativeDir) { - /* Now that we know the signature is okay, and we have a - * publication time, cache the list. */ - dirserv_set_cached_directory(str, published_on, 1); - } + /* Now that we know the signature is okay, and we have a + * publication time, cache the list. */ + dirserv_set_cached_directory(str, published_on, 1); if (!(tok = find_first_by_keyword(tokens, K_ROUTER_STATUS))) { if (!(tok = find_first_by_keyword(tokens, K_RUNNING_ROUTERS))) { |