[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] only non-authdirservers cache the dir they just fetched
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
dirserv.c routerparse.c
Log Message:
only non-authdirservers cache the dir they just fetched
Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dirserv.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- dirserv.c 9 Nov 2004 07:20:21 -0000 1.114
+++ dirserv.c 9 Nov 2004 10:38:42 -0000 1.115
@@ -688,6 +688,7 @@
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: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerparse.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- routerparse.c 9 Nov 2004 06:37:58 -0000 1.73
+++ routerparse.c 9 Nov 2004 10:38:42 -0000 1.74
@@ -345,9 +345,11 @@
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)