aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-09-24 21:21:40 +0000
committerRoger Dingledine <arma@torproject.org>2006-09-24 21:21:40 +0000
commit028654b79edf64089c3c15eea5e5095e2d59a825 (patch)
tree29e12ee17d766386e27efd40e9744db4edf398f9
parentd276997c66c533950722836acf2e0cef2e3e2bc4 (diff)
downloadtor-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--ChangeLog3
-rw-r--r--src/or/control.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6bbe71f8ef..22087e4c28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,