diff options
author | Kamran Riaz Khan <krkhan@inspirated.com> | 2011-08-16 06:28:38 +0500 |
---|---|---|
committer | Kamran Riaz Khan <krkhan@inspirated.com> | 2011-08-16 06:28:38 +0500 |
commit | e6e804848c4764f5ea0d6705707b2c81de4c02ae (patch) | |
tree | 36dcf24dd5952227776b9ad5044e0976e3cc4de4 /src/or | |
parent | 2dc40b9c49ec13ed24b5a541ce6cfecfe79effbf (diff) | |
download | tor-e6e804848c4764f5ea0d6705707b2c81de4c02ae.tar tor-e6e804848c4764f5ea0d6705707b2c81de4c02ae.tar.gz |
Don't compare LINELIST_S and OBSOLETE config options.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index b4d733a6f..5d41ab664 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -591,6 +591,8 @@ static int write_configuration_file(const char *fname, static config_line_t *get_assigned_option(const config_format_t *fmt, const void *options, const char *key, int escape_val); +static const config_var_t *config_find_option(const config_format_t *fmt, + const char *key); static void config_init(const config_format_t *fmt, void *options); static int or_state_validate(or_state_t *old_options, or_state_t *options, int from_setconf, char **msg); @@ -699,6 +701,7 @@ set_options(or_options_t *new_val, char **msg) int i; smartlist_t *elements; config_line_t *line; + config_var_t *var; or_options_t *old_options = global_options; global_options = new_val; /* Note that we pass the *old* options below, for comparison. It @@ -718,6 +721,12 @@ set_options(or_options_t *new_val, char **msg) if (old_options) { elements = smartlist_create(); for (i=0; options_format.vars[i].name; ++i) { + var = config_find_option(&options_format, + options_format.vars[i].name); + if (var->type == CONFIG_TYPE_LINELIST_S || + var->type == CONFIG_TYPE_OBSOLETE) { + continue; + } if (!option_is_same(&options_format, new_val, old_options, options_format.vars[i].name)) { line = get_assigned_option(&options_format, new_val, |