]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
only non-authdirservers cache the dir they just fetched
authorRoger Dingledine <arma@torproject.org>
Tue, 9 Nov 2004 10:38:42 +0000 (10:38 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 9 Nov 2004 10:38:42 +0000 (10:38 +0000)
svn:r2747

src/or/dirserv.c
src/or/routerparse.c

index c0fc76c3918bc8d281bf5786003cef016c2e2637..54d1ec3f7e877a1562f1e73a6250db2e0b12d802 100644 (file)
@@ -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;
index dcdc0563bc15972e9c1d794b6c0b23852104036c..27e59ea9fa7fad5b2be80fee2002c0a65e435278 100644 (file)
@@ -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)