summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-09-14 02:12:29 +0000
committerRoger Dingledine <arma@torproject.org>2005-09-14 02:12:29 +0000
commit62fe24c40cb77c38f5adc4aacd20614b48e461ff (patch)
tree4e95e9971d3561270cb2e567e31953269cf18616
parent1f930a9a70ab5b93b5cb7a076743c6b8fc9cc4fb (diff)
downloadtor-62fe24c40cb77c38f5adc4aacd20614b48e461ff.tar.gz
tor-62fe24c40cb77c38f5adc4aacd20614b48e461ff.zip
ok, ok, csv's get replaced even when we assign them from the torrc.
svn:r5041
-rw-r--r--src/or/config.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 6a297e61fc..9d950c9ec7 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -834,9 +834,9 @@ config_assign_value(config_format_t *fmt, or_options_t *options,
case CONFIG_TYPE_CSV:
if (!*(smartlist_t**)lvalue) {
-// SMARTLIST_FOREACH(*(smartlist_t**)lvalue, char *, cp, tor_free(cp));
-// smartlist_clear(*(smartlist_t**)lvalue);
-// } else {
+ SMARTLIST_FOREACH(*(smartlist_t**)lvalue, char *, cp, tor_free(cp));
+ smartlist_clear(*(smartlist_t**)lvalue);
+ } else {
*(smartlist_t**)lvalue = smartlist_create();
}
@@ -1057,7 +1057,8 @@ get_assigned_option(config_format_t *fmt, or_options_t *options, const char *key
* clearing, or make the value 0 or NULL.
*
* Here are the use cases:
- * 1. A non-empty AllowUnverified line in your torrc. Appends to current.
+ * 1. A non-empty AllowUnverified line in your torrc. Appends to current
+ * if linelist, replaces current if csv.
* 2. An empty AllowUnverified line in your torrc. Should clear it.
* 3. "RESETCONF AllowUnverified" sets it to default.
* 4. "SETCONF AllowUnverified" makes it NULL.