mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Remove broken and undocumented wart where multiple CSV config lines are appended rather than replaced. Resolves bug #49
svn:r3301
This commit is contained in:
parent
f6b0032c31
commit
e99f79fa4d
@ -583,8 +583,12 @@ config_assign_line(or_options_t *options, struct config_line_t *c, int reset)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CONFIG_TYPE_CSV:
|
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_t**)lvalue = smartlist_create();
|
||||||
|
}
|
||||||
|
|
||||||
smartlist_split_string(*(smartlist_t**)lvalue, c->value, ",",
|
smartlist_split_string(*(smartlist_t**)lvalue, c->value, ",",
|
||||||
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
|
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user