[or-cvs] make NoPublish (even though deprecated) work again.

arma at seul.org arma at seul.org
Sun Apr 2 02:59:50 UTC 2006


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

Modified Files:
	config.c 
Log Message:
make NoPublish (even though deprecated) work again.


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.547
retrieving revision 1.548
diff -u -p -d -r1.547 -r1.548
--- config.c	27 Mar 2006 02:25:34 -0000	1.547
+++ config.c	2 Apr 2006 02:59:48 -0000	1.548
@@ -2084,6 +2084,12 @@ options_validate(or_options_t *old_optio
   if (options_init_logs(options, 1)<0) /* Validate the log(s) */
     REJECT("Failed to validate Log options. See logs for details.");
 
+  if (options->NoPublish) {
+    log(LOG_WARN, LD_CONFIG,
+        "NoPublish is obsolete. Use PublishServerDescriptor instead.");
+    options->PublishServerDescriptor = 0;
+  }
+
   if (server_mode(options)) {
     /* confirm that our address isn't broken, so we can complain now */
     uint32_t tmp;
@@ -2153,12 +2159,6 @@ options_validate(or_options_t *old_optio
   if (options->AuthoritativeDir && options->ClientOnly)
     REJECT("Running as authoritative directory, but ClientOnly also set.");
 
-  if (options->NoPublish) {
-    log(LOG_WARN, LD_CONFIG,
-        "NoPublish is obsolete. Use PublishServerDescriptor instead.");
-    options->PublishServerDescriptor = 0;
-  }
-
   if (options->ConnLimit <= 0) {
     r = tor_snprintf(buf, sizeof(buf),
         "ConnLimit must be greater than 0, but was set to %d",



More information about the tor-commits mailing list