diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-06-19 22:38:36 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-06-19 22:38:36 +0000 |
commit | eb327e7660917957a4b17a92a7c70b70c00b67c5 (patch) | |
tree | 3e1e5c8ab449dcb1952ef786fb69842439fc9474 | |
parent | 64fc1f7bae174d62c40686ec00674d2671c88258 (diff) | |
download | tor-eb327e7660917957a4b17a92a7c70b70c00b67c5.tar.gz tor-eb327e7660917957a4b17a92a7c70b70c00b67c5.zip |
Add feature to handle unset (default) configuration options in GETCONF control messages
svn:r4461
-rwxr-xr-x | contrib/TorControl.py | 2 | ||||
-rw-r--r-- | src/or/control.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/contrib/TorControl.py b/contrib/TorControl.py index fd3d2560fa..23a7804ced 100755 --- a/contrib/TorControl.py +++ b/contrib/TorControl.py @@ -433,7 +433,7 @@ def do_main_loop(host,port): (".", "abacinator.onion")])` print `extend_circuit(s,0,["moria1"])` print '========' - print `extend_circuit(s,0,[""])` + #print `extend_circuit(s,0,[""])` print '========' #send_signal(s,1) #save_conf(s) diff --git a/src/or/control.c b/src/or/control.c index e584c68e79..969dd47991 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; |