diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-01-05 02:51:04 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-01-05 02:51:04 +0000 |
commit | e99f79fa4d709b4d714e641d180b14c89ec0f7e1 (patch) | |
tree | 1570a641698373c629ad0db7753ef9eed72f55a5 /src/or/config.c | |
parent | f6b0032c316756b2673ab7d9b772516f44c96668 (diff) | |
download | tor-e99f79fa4d709b4d714e641d180b14c89ec0f7e1.tar.gz tor-e99f79fa4d709b4d714e641d180b14c89ec0f7e1.zip |
Remove broken and undocumented wart where multiple CSV config lines are appended rather than replaced. Resolves bug #49
svn:r3301
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 284afe5e09..c5699b427d 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -583,8 +583,12 @@ config_assign_line(or_options_t *options, struct config_line_t *c, int reset) 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); |