[or-cvs] During options_dup, don"t copy LINELIST_S or OBSOLETE optio...
Roger Dingledine
arma at seul.org
Tue Nov 9 06:18:19 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
config.c
Log Message:
During options_dup, don't copy LINELIST_S or OBSOLETE options.
And recognize obsolete options now in config_get_assigned_option().
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -d -r1.225 -r1.226
--- config.c 9 Nov 2004 06:09:06 -0000 1.225
+++ config.c 9 Nov 2004 06:18:17 -0000 1.226
@@ -604,6 +604,11 @@
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 @@
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) {
More information about the tor-commits
mailing list