[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] stop re-reading and re-parsing the directory as soon as we ...



Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	dirserv.c 
Log Message:
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.


Index: dirserv.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- dirserv.c	12 Apr 2005 22:09:04 -0000	1.158
+++ dirserv.c	27 Apr 2005 00:48:05 -0000	1.159
@@ -14,7 +14,7 @@
 /** 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 @@
     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 @@
     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.