[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Remove broken and undocumented wart where multiple CSV conf...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Remove broken and undocumented wart where multiple CSV conf...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Tue, 4 Jan 2005 21:51:06 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 04 Jan 2005 21:51:30 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
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);