summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-04-27 00:48:05 +0000
committerRoger Dingledine <arma@torproject.org>2005-04-27 00:48:05 +0000
commit914ee87e0734f0e566ba02943fa5c7517f4c1844 (patch)
treef4ccdaa6a3d787c9d5474584899f384f546779de
parentadaf3d31e69225914dab70c0311f4700fae7b0f0 (diff)
downloadtor-914ee87e0734f0e566ba02943fa5c7517f4c1844.tar.gz
tor-914ee87e0734f0e566ba02943fa5c7517f4c1844.zip
stop re-reading and re-parsing the directory as soon as we make it.
it was nice for checking if we've got bugs, but it's really quite expensive too. it was also nice for updating our routerinfo's immediately, but we'll update them like everybody else when we fetch a new dir from somebody else. svn:r4128
-rw-r--r--src/or/dirserv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 239e2e8f0f..ee2c596917 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -14,7 +14,7 @@ const char dirserv_c_id[] = "$Id$";
/** How far in the future do we allow a router to get? (seconds) */
#define ROUTER_ALLOW_SKEW (60*60*12) /* 12 hours */
/** How many seconds do we wait before regenerating the directory? */
-#define DIR_REGEN_SLACK_TIME 10
+#define DIR_REGEN_SLACK_TIME 5
/** Do we need to regenerate the directory when someone asks for it? */
static int the_directory_is_dirty = 1;
@@ -850,6 +850,7 @@ static int dirserv_regenerate_directory(void)
return -1;
}
+#if 0
/* Now read the directory we just made in order to update our own
* router lists. This does more signature checking than is strictly
* necessary, but safe is better than sorry. */
@@ -862,6 +863,7 @@ static int dirserv_regenerate_directory(void)
exit(0);
}
tor_free(new_directory);
+#endif
the_directory_is_dirty = 0;
/* Save the directory to disk so we re-load it quickly on startup.