mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
only non-authdirservers cache the dir they just fetched
svn:r2747
This commit is contained in:
parent
3235c72f6c
commit
b773045a58
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user