diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-09 06:18:17 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-09 06:18:17 +0000 |
commit | 677124fd0c34e94ba88b658bdc239100e873cfd2 (patch) | |
tree | eb1178a9909c1d8406580ba9db196e06084d06f1 /src | |
parent | 94b9525f6e62d5e66df98b96878ec52e5e7cd964 (diff) | |
download | tor-677124fd0c34e94ba88b658bdc239100e873cfd2.tar tor-677124fd0c34e94ba88b658bdc239100e873cfd2.tar.gz |
During options_dup, don't copy LINELIST_S or OBSOLETE options.
And recognize obsolete options now in config_get_assigned_option().
svn:r2729
Diffstat (limited to 'src')
-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 3e3a3f7d5..0843e855a 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -604,6 +604,11 @@ config_get_assigned_option(or_options_t *options, const char *key) else result->value = tor_strdup(""); break; + case CONFIG_TYPE_OBSOLETE: + log_fn(LOG_WARN,"You asked me for the value of an obsolete config option %s.", key); + tor_free(result->key); + tor_free(result); + return NULL; default: tor_free(result->key); tor_free(result); @@ -915,6 +920,10 @@ options_dup(or_options_t *old) newopts = tor_malloc_zero(sizeof(or_options_t)); for (i=0; config_vars[i].name; ++i) { + if(config_vars[i].type == CONFIG_TYPE_LINELIST_S) + continue; + if(config_vars[i].type == CONFIG_TYPE_OBSOLETE) + continue; line = config_get_assigned_option(old, config_vars[i].name); if (line) { if (config_assign(newopts, line, 0) < 0) { |