[or-cvs] Remove broken and undocumented wart where multiple CSV conf...
Nick Mathewson
nickm at seul.org
Wed Jan 5 02:51:06 UTC 2005
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv25365/src/or
Modified Files:
config.c
Log Message:
Remove broken and undocumented wart where multiple CSV config lines are appended rather than replaced. Resolves bug #49
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.293
retrieving revision 1.294
diff -u -d -r1.293 -r1.294
--- config.c 4 Jan 2005 03:46:50 -0000 1.293
+++ config.c 5 Jan 2005 02:51:04 -0000 1.294
@@ -583,8 +583,12 @@
break;
case CONFIG_TYPE_CSV:
- if (*(smartlist_t**)lvalue == NULL)
+ if (*(smartlist_t**)lvalue) {
+ SMARTLIST_FOREACH(*(smartlist_t**)lvalue, char *, cp, tor_free(cp));
+ smartlist_clear(*(smartlist_t**)lvalue);
+ } else {
*(smartlist_t**)lvalue = smartlist_create();
+ }
smartlist_split_string(*(smartlist_t**)lvalue, c->value, ",",
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
More information about the tor-commits
mailing list