diff options
author | Roger Dingledine <arma@torproject.org> | 2006-09-24 21:21:40 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-09-24 21:21:40 +0000 |
commit | 028654b79edf64089c3c15eea5e5095e2d59a825 (patch) | |
tree | 29e12ee17d766386e27efd40e9744db4edf398f9 | |
parent | d276997c66c533950722836acf2e0cef2e3e2bc4 (diff) | |
download | tor-028654b79edf64089c3c15eea5e5095e2d59a825.tar.gz tor-028654b79edf64089c3c15eea5e5095e2d59a825.zip |
backport r8355:
fix encoding in "getinfo addr-mappings" response.
fix error code when "getinfo dir/status/" fails.
svn:r8486
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/or/control.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -11,6 +11,8 @@ Changes in version 0.1.1.24 - 2006-09-xx [ongoing] - Allow Tor to start when RunAsDaemon is set but no logs are set. - Don't crash when the controller receives a third argument to an "extendcircuit" request. + - Controller protocol fixes: fix encoding in "getinfo addr-mappings" + response; fix error code when "getinfo dir/status/" fails. - Fix configure.in to not produce broken configure files with more recent versions of autoconf. Thanks to Clint for his auto* voodoo. @@ -20,6 +22,7 @@ Changes in version 0.1.1.24 - 2006-09-xx [ongoing] - Warn when using libevent 1.1a or earlier with win32 or kqueue methods: these are known to be buggy. + Changes in version 0.1.1.23 - 2006-07-30 o Major bugfixes: - Fast Tor servers, especially exit nodes, were triggering asserts diff --git a/src/or/control.c b/src/or/control.c index 55b4fc01bb..7faeff8e7e 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1482,7 +1482,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, "dir-usage")) { @@ -1514,7 +1514,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, |