[or-cvs] r11228: Let directory authorities startup even when they can't gener (in tor/trunk: . src/or)

arma at seul.org arma at seul.org
Mon Aug 20 18:29:17 UTC 2007


Author: arma
Date: 2007-08-20 14:29:17 -0400 (Mon, 20 Aug 2007)
New Revision: 11228

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/router.c
Log:
Let directory authorities startup even when they can't generate 
a descriptor immediately, e.g. because they don't know their 
address.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-08-20 18:16:27 UTC (rev 11227)
+++ tor/trunk/ChangeLog	2007-08-20 18:29:17 UTC (rev 11228)
@@ -1,5 +1,4 @@
 Changes in version 0.2.0.6-alpha - 2007-??-??
-
   o Minor bugfixes (bridges):
     - Do not intermix bridge routers with controller-added routers. (Bugfix
       on 0.2.0.x)
@@ -8,6 +7,12 @@
     - Do not fail with an assert when accept() returns an unexpected address
       family.  Addresses but does not wholly fix bug 483. (Bugfix on 0.2.0.x)
 
+  o Minor bugfixes (misc):
+    - Let directory authorities startup even when they can't generate
+      a descriptor immediately, e.g. because they don't know their
+      address.
+
+
 Changes in version 0.2.0.5-alpha - 2007-08-19
   o Removed features:
     - Version 1 directories are no longer generated in full. Instead,

Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c	2007-08-20 18:16:27 UTC (rev 11227)
+++ tor/trunk/src/or/router.c	2007-08-20 18:29:17 UTC (rev 11228)
@@ -429,20 +429,18 @@
       log_err(LD_GENERAL,"Error adding own fingerprint to approved set");
       return -1;
     }
-    if (!mydesc) {
-      log_err(LD_GENERAL,"Error initializing descriptor.");
-      return -1;
+    if (mydesc) {
+      ri = router_parse_entry_from_string(mydesc, NULL, 1);
+      if (!ri) {
+        log_err(LD_GENERAL,"Generated a routerinfo we couldn't parse.");
+        return -1;
+      }
+      if (dirserv_add_descriptor(ri, &m) < 0) {
+        log_err(LD_GENERAL,"Unable to add own descriptor to directory: %s",
+                m?m:"<unknown error>");
+        return -1;
+      }
     }
-    ri = router_parse_entry_from_string(mydesc, NULL, 1);
-    if (!ri) {
-      log_err(LD_GENERAL,"Generated a routerinfo we couldn't parse.");
-      return -1;
-    }
-    if (dirserv_add_descriptor(ri, &m) < 0) {
-      log_err(LD_GENERAL,"Unable to add own descriptor to directory: %s",
-              m?m:"<unknown error>");
-      return -1;
-    }
   }
 
   /* 5. Dump fingerprint to 'fingerprint' */



More information about the tor-commits mailing list