aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-04-11 14:47:42 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-16 10:36:21 -0400
commitb41dd8069f25ef6f6fdb22088291e23e0442476e (patch)
tree899597a45d6fd1efaffe95af990d293571b6d90a /src/or/config.c
parentd9ceab5bc3611fa6ed4e2f58d38ff26860eeeb3c (diff)
downloadtor-b41dd8069f25ef6f6fdb22088291e23e0442476e.tar.gz
tor-b41dd8069f25ef6f6fdb22088291e23e0442476e.zip
When ReloadTorrcOnSIGHUP=1, do non-reload activities anyway
Previously, we skipped everything that got invoked from options_init_from_torrc. But some of the stuff in options_act_reversible and options_act is actually important, like reopening the logs. Now, a SIGHUP always makes the effects of an options_set() happen, even though the options haven't changed. Fix for bug 5095; bugfix on 0.2.1.9-alpha, which introduced __ReloadTorrcOnSIGHUP.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index dcc57f8e77..27aa8a2f23 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -748,7 +748,7 @@ set_options(or_options_t *new_val, char **msg)
}
/* Issues a CONF_CHANGED event to notify controller of the change. If Tor is
* just starting up then the old_options will be undefined. */
- if (old_options) {
+ if (old_options && old_options != global_options) {
elements = smartlist_new();
for (i=0; options_format.vars[i].name; ++i) {
const config_var_t *var = &options_format.vars[i];
@@ -774,7 +774,9 @@ set_options(or_options_t *new_val, char **msg)
control_event_conf_changed(elements);
smartlist_free(elements);
}
- config_free(&options_format, old_options);
+
+ if (old_options != global_options)
+ config_free(&options_format, old_options);
return 0;
}