]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Be willing to cache directories from up to ROUTER_MAX_AGE seconds into the future...
authorNick Mathewson <nickm@torproject.org>
Wed, 23 Mar 2005 06:39:53 +0000 (06:39 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 23 Mar 2005 06:39:53 +0000 (06:39 +0000)
svn:r3832

src/or/dirserv.c

index 5f6b314bbc5a6132b765413ff43e624e1c9cc398..12641c714b539c405623a98a014ba63e2f80ab2a 100644 (file)
@@ -751,10 +751,10 @@ void dirserv_set_cached_directory(const char *directory, time_t when,
   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);