]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make sure we have our own keys before we initialize our routerlist
authorNick Mathewson <nickm@torproject.org>
Wed, 7 Apr 2004 21:44:46 +0000 (21:44 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 7 Apr 2004 21:44:46 +0000 (21:44 +0000)
svn:r1535

src/or/main.c

index afe3566fb964f2d9c608f460bde43b97b6c34b74..0842a1c50a36b55a5fec444949ee0a72e52033c5 100644 (file)
@@ -553,13 +553,6 @@ static int do_main_loop(void) {
   int timeout;
   int poll_result;
 
-  /* load the routers file */
-  if(options.RouterFile &&
-     router_set_routerlist_from_file(options.RouterFile) < 0) {
-    log_fn(LOG_ERR,"Error loading router list.");
-    return -1;
-  }
-
   /* Initialize the history structures. */
   rep_hist_init();
   /* Intialize the service cache. */
@@ -572,6 +565,13 @@ static int do_main_loop(void) {
     return -1;
   }
 
+  /* load the routers file */
+  if(options.RouterFile &&
+     router_set_routerlist_from_file(options.RouterFile) < 0) {
+    log_fn(LOG_ERR,"Error loading router list.");
+    return -1;
+  }
+
   if(options.DirPort) { /* the directory is already here, run startup things */
     has_fetched_directory = 1;
     directory_has_arrived();