[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Be willing to cache directories from up to ROUTER_MAX_AGE s...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Be willing to cache directories from up to ROUTER_MAX_AGE s...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Wed, 23 Mar 2005 01:39:56 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 23 Mar 2005 01:40:24 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv402/src/or
Modified Files:
dirserv.c
Log Message:
Be willing to cache directories from up to ROUTER_MAX_AGE seconds into the future, now that we are more tolerant of skew.
Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- dirserv.c 23 Mar 2005 06:20:50 -0000 1.145
+++ dirserv.c 23 Mar 2005 06:39:53 -0000 1.146
@@ -751,10 +751,10 @@
d = is_running_routers ? &cached_runningrouters : &cached_directory;
if (when<=d->published) {
log_fn(LOG_INFO, "Ignoring old directory; not caching.");
- } else if (when>=now+ROUTER_ALLOW_SKEW) {
+ } else if (when>=now+ROUTER_MAX_AGE) {
log_fn(LOG_INFO, "Ignoring future directory; not caching.");
- } else if (when>d->published &&
- when<now+ROUTER_ALLOW_SKEW) {
+ } else {
+ /* if (when>d->published && when<now+ROUTER_MAX_AGE) */
log_fn(LOG_DEBUG, "Caching directory.");
tor_free(d->dir);
d->dir = tor_strdup(directory);