From ba67d14d407adcf603d422c07236438083aa0f30 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 5 Oct 2005 23:02:40 +0000 Subject: On sighup, if usehelpernodes changed to 1, use new circuits. svn:r5203 --- doc/TODO | 2 +- src/or/config.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/TODO b/doc/TODO index 9700eaa31..5e9fdee16 100644 --- a/doc/TODO +++ b/doc/TODO @@ -57,7 +57,7 @@ N . Additional controller features . Helper nodes . More testing and debugging - - On sighup, if usehelpernodes changed to 1, use new circuits? + o On sighup, if usehelpernodes changed to 1, use new circuits? - If your helper nodes are unavailable, don't abandon them unless other nodes *are* reachable. R - If you think an OR conn is open but you can never establish a circuit diff --git a/src/or/config.c b/src/or/config.c index 4655e2c2b..d7ac5f72c 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -623,6 +623,12 @@ options_act(or_options_t *old_options) /* Check for transitions that need action. */ if (old_options) { + if (options->UseHelperNodes && !old_options->UseHelperNodes) { + log_fn(LOG_INFO, "Switching to helper nodes; abandoning previous circuits"); + circuit_mark_all_unused_circs(); + circuit_expire_all_dirty_circs(); + } + if (options_transition_affects_workers(old_options, options)) { log_fn(LOG_INFO,"Worker-related options changed. Rotating workers."); cpuworkers_rotate(); -- cgit v1.2.3