summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-01-17 04:01:32 +0000
committerRoger Dingledine <arma@torproject.org>2006-01-17 04:01:32 +0000
commit21be9dc3c0c35db734c182865270a86cb613bcad (patch)
tree7ddd8b4b4cfe9544f414b4b3284f3eacb9e719a0
parent76f1b7415b89083c5bcc9e13a4de0a98446eb9cc (diff)
downloadtor-21be9dc3c0c35db734c182865270a86cb613bcad.tar.gz
tor-21be9dc3c0c35db734c182865270a86cb613bcad.zip
when you tried to set orport through the controller, it would
trigger an assert because you hadn't made your onion keys yet you wanted to launch cpu workers. now init keys first, reset uptime, and tell the user that we're starting the reachability testing. svn:r5835
-rw-r--r--src/or/config.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 22376af023..61e6d98ae9 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -729,6 +729,16 @@ options_act(or_options_t *old_options)
if (options_transition_affects_workers(old_options, options)) {
info(LD_GENERAL,"Worker-related options changed. Rotating workers.");
+ if (server_mode(options) && !server_mode(old_options)) {
+ extern int has_completed_circuit;
+ if (init_keys() < 0) {
+ err(LD_GENERAL,"Error initializing keys; exiting");
+ return -1;
+ }
+ server_has_changed_ip();
+ if (has_completed_circuit)
+ inform_testing_reachability();
+ }
cpuworkers_rotate();
dnsworkers_rotate();
}