aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-06-19 22:38:36 +0000
committerNick Mathewson <nickm@torproject.org>2005-06-19 22:38:36 +0000
commiteb327e7660917957a4b17a92a7c70b70c00b67c5 (patch)
tree3e1e5c8ab449dcb1952ef786fb69842439fc9474 /src/or/control.c
parent64fc1f7bae174d62c40686ec00674d2671c88258 (diff)
downloadtor-eb327e7660917957a4b17a92a7c70b70c00b67c5.tar
tor-eb327e7660917957a4b17a92a7c70b70c00b67c5.tar.gz
Add feature to handle unset (default) configuration options in GETCONF control messages
svn:r4461
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c
index e584c68e7..969dd4799 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -693,7 +693,12 @@ handle_control_getconf(connection_t *conn, uint32_t body_len, const char *body)
}
} else {
struct config_line_t *answer = config_get_assigned_option(options,q);
- /* XXXX handle non-set options in V1 at least*/
+ if (!v0 && !answer) {
+ size_t alen = strlen(q)+8;
+ char *astr = tor_malloc(alen);
+ tor_snprintf(astr, alen, "250-%s\r\n", q);
+ smartlist_add(answers, astr);
+ }
while (answer) {
struct config_line_t *next;