[or-cvs] r11108: Resolve XXXX020s in config.c (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Aug 14 20:19:46 UTC 2007


Author: nickm
Date: 2007-08-14 16:19:46 -0400 (Tue, 14 Aug 2007)
New Revision: 11108

Modified:
   tor/trunk/
   tor/trunk/src/or/config.c
Log:
 r14018 at Kushana:  nickm | 2007-08-14 15:39:35 -0400
 Resolve XXXX020s in config.c



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r14018] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-08-14 20:19:40 UTC (rev 11107)
+++ tor/trunk/src/or/config.c	2007-08-14 20:19:46 UTC (rev 11108)
@@ -760,10 +760,7 @@
 const char *
 safe_str(const char *address)
 {
-  if (!address) { /* XXX020 eventually turn this into an assert */
-    log_warn(LD_BUG, "safe_str() called with NULL address.");
-    return "EMPTY";
-  }
+  tor_assert(address);
   if (get_options()->SafeLogging)
     return "[scrubbed]";
   else
@@ -2640,8 +2637,11 @@
                "extra-info documents. Setting DownloadExtraInfo.");
       options->DownloadExtraInfo = 1;
     }
-    /* XXXX020 Check that at least one of Bridge/HS/V1/V2/V2{AuthoritativeDir}
-     * is set. */
+    if (!(options->BridgeAuthoritativeDir || options->HSAuthoritativeDir ||
+          options->V1AuthoritativeDir || options->V2AuthoritativeDir ||
+          options->V3AuthoritativeDir))
+      REJECT("AuthoritativeDir is set, but none of "
+             "(Bridge/HS/V1/V2/V3)AuthoriativeDir is set.");
   }
 
   if (options->AuthoritativeDir && !options->DirPort)



More information about the tor-commits mailing list