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

[or-cvs] Permit transitioning from ORPort=0 to ORPort!=0, and back.



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:
Permit transitioning from ORPort=0 to ORPort!=0, and back.

This is actually a bit more subtle, because we need to rotate
the dnsworkers and cpuworkers if certain options (logs, orport, etc)
change. Maybe set_options() should detect this and notify the caller
that it should rotate them.

Expect some mysterious crashes.


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.390
retrieving revision 1.391
diff -u -d -r1.390 -r1.391
--- config.c	15 Aug 2005 10:27:37 -0000	1.390
+++ config.c	15 Aug 2005 10:30:45 -0000	1.391
@@ -1955,11 +1955,6 @@
     return -1;
   }
 
-  if (old->ORPort != new_val->ORPort) {
-    log_fn(LOG_WARN,"While Tor is running, changing ORPort is not allowed. Failing.");
-    return -1;
-  }
-
   if (strcmp(old->DataDirectory,new_val->DataDirectory)!=0) {
     log_fn(LOG_WARN,"While Tor is running, changing DataDirectory (%s->%s) is not allowed. Failing.", old->DataDirectory, new_val->DataDirectory);
     return -1;