diff options
author | Roger Dingledine <arma@torproject.org> | 2006-09-09 03:38:03 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-09-09 03:38:03 +0000 |
commit | 0c3cc1589856840a94fc04c72dc17eb75d708c23 (patch) | |
tree | 54e8d63c1c4d2d02797fb7b68006c44f149d16a0 /src | |
parent | 29b6d6560eecfe7a97631b48d4af208c54e95f12 (diff) | |
download | tor-0c3cc1589856840a94fc04c72dc17eb75d708c23.tar.gz tor-0c3cc1589856840a94fc04c72dc17eb75d708c23.zip |
fix encoding in "getinfo addr-mappings" response.
fix error code when "getinfo dir/status/" fails.
svn:r8355
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c index 84a6173b9e..214f0ef7c9 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1518,7 +1518,7 @@ handle_getinfo_helper(const char *question, char **answer) } mappings = smartlist_create(); addressmap_get_mappings(mappings, min_e, max_e); - *answer = smartlist_join_strings(mappings, "\n", 0, NULL); + *answer = smartlist_join_strings(mappings, "\r\n", 0, NULL); SMARTLIST_FOREACH(mappings, char *, cp, tor_free(cp)); smartlist_free(mappings); } else if (!strcmp(question, "address")) { @@ -1555,7 +1555,7 @@ handle_getinfo_helper(const char *question, char **answer) char *cp; if (!get_options()->DirPort) { log_warn(LD_CONTROL, "getinfo dir/status/ requires an open dirport."); - return 0; + return -1; } status_list = smartlist_create(); dirserv_get_networkstatus_v2(status_list, |