diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-24 08:49:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-24 08:49:24 -0400 |
commit | d2951b381bcbd45798b6cf8f01c5ce7a4d9ad4b9 (patch) | |
tree | 3a30b8aa14b3688fbc980ae54821824b1dd820ac /src/or/config.c | |
parent | 1438c6c7134c53b2aa3b5e9abf94fe12a4d9bd5e (diff) | |
parent | e8886340762cbe3be306268dfe0003214b09ac07 (diff) | |
download | tor-d2951b381bcbd45798b6cf8f01c5ce7a4d9ad4b9.tar.gz tor-d2951b381bcbd45798b6cf8f01c5ce7a4d9ad4b9.zip |
Merge branch 'maint-0.3.1' into maint-0.3.2
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 0ea1ebc5d0..79cfcb4111 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -2007,9 +2007,16 @@ options_act(const or_options_t *old_options) if (transition_affects_workers) { log_info(LD_GENERAL, "Worker-related options changed. Rotating workers."); + const int server_mode_turned_on = + server_mode(options) && !server_mode(old_options); + const int dir_server_mode_turned_on = + dir_server_mode(options) && !dir_server_mode(old_options); - if (server_mode(options) && !server_mode(old_options)) { + if (server_mode_turned_on || dir_server_mode_turned_on) { cpu_init(); + } + + if (server_mode_turned_on) { ip_address_changed(0); if (have_completed_a_circuit() || !any_predicted_circuits(time(NULL))) inform_testing_reachability(); @@ -4657,6 +4664,7 @@ options_transition_affects_workers(const or_options_t *old_options, old_options->SafeLogging_ != new_options->SafeLogging_ || old_options->ClientOnly != new_options->ClientOnly || server_mode(old_options) != server_mode(new_options) || + dir_server_mode(old_options) != dir_server_mode(new_options) || public_server_mode(old_options) != public_server_mode(new_options) || !config_lines_eq(old_options->Logs, new_options->Logs) || old_options->LogMessageDomains != new_options->LogMessageDomains) |