diff options
author | Roger Dingledine <arma@torproject.org> | 2004-10-06 05:05:43 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-10-06 05:05:43 +0000 |
commit | 8b02610bd517a884e2077e1b5d14a5a4e71da0d0 (patch) | |
tree | 380df291160a9f9a54b34054f9f836daee0e41e6 /src/or | |
parent | 6a7c44046eb5343bea6a86b9b4e841aae24c3268 (diff) | |
download | tor-8b02610bd517a884e2077e1b5d14a5a4e71da0d0.tar tor-8b02610bd517a884e2077e1b5d14a5a4e71da0d0.tar.gz |
when an OR starts up, it loads its directory from cache.
then it serves *that directory* to others who ask for a copy of the
directory. it's better to serve no directory at all until you have a
fresh copy.
svn:r2418
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/routerlist.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index f0756b3e0..2c79c3907 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -794,11 +794,11 @@ int router_load_routerlist_from_string(const char *s, int trusted) * pkey; else check against the pkey of the signing directory server. */ int router_load_routerlist_from_directory(const char *s, crypto_pk_env_t *pkey, - int check_version) + int dir_is_recent) { routerlist_t *new_list = NULL; if (router_parse_routerlist_from_directory(s, &new_list, pkey, - check_version)) { + dir_is_recent)) { log_fn(LOG_WARN, "Couldn't parse directory."); return -1; } @@ -823,7 +823,8 @@ int router_load_routerlist_from_directory(const char *s, dirserv_load_from_directory_string(s); } else { /* Remember the directory. */ - dirserv_set_cached_directory(s, routerlist->published_on); + if(dir_is_recent) + dirserv_set_cached_directory(s, routerlist->published_on); } return 0; } |