From: Roger Dingledine Date: Tue, 9 Nov 2004 10:38:42 +0000 (+0000) Subject: only non-authdirservers cache the dir they just fetched X-Git-Tag: debian-version-0.0.8+0.0.9pre5-1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b773045a584c73c7e3c902bf7eef76eea9b7469e;p=thirdparty%2Ftor.git only non-authdirservers cache the dir they just fetched svn:r2747 --- diff --git a/src/or/dirserv.c b/src/or/dirserv.c index c0fc76c391..54d1ec3f7e 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -688,6 +688,7 @@ static char *cached_directory_z = NULL; static size_t cached_directory_z_len = 0; static time_t cached_directory_published = 0; +/** DOCDOC */ void dirserv_set_cached_directory(const char *directory, time_t when) { time_t now; diff --git a/src/or/routerparse.c b/src/or/routerparse.c index dcdc0563bc..27e59ea9fa 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -345,9 +345,11 @@ router_parse_routerlist_from_directory(const char *str, smartlist_free(tokens); tokens = NULL; - /* Now that we know the signature is okay, cache the directory. */ - /* XXXX009 extract published time if possible. */ - dirserv_set_cached_directory(str, time(NULL)); + if(!get_options()->AuthoritativeDir) { + /* Now that we know the signature is okay, cache the directory. */ + /* XXXX009 extract published time if possible. */ + dirserv_set_cached_directory(str, time(NULL)); + } /* Now that we know the signature is okay, check the version. */ if (check_version)