mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Add feature to handle unset (default) configuration options in GETCONF control messages
svn:r4461
This commit is contained in:
parent
64fc1f7bae
commit
eb327e7660
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user