[or-cvs] r8355: fix encoding in "getinfo addr-mappings" response. fix error (tor/trunk/src/or)
arma at seul.org
arma at seul.org
Sat Sep 9 03:38:03 UTC 2006
Author: arma
Date: 2006-09-08 23:38:03 -0400 (Fri, 08 Sep 2006)
New Revision: 8355
Modified:
tor/trunk/src/or/control.c
Log:
fix encoding in "getinfo addr-mappings" response.
fix error code when "getinfo dir/status/" fails.
Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c 2006-09-09 03:18:39 UTC (rev 8354)
+++ tor/trunk/src/or/control.c 2006-09-09 03:38:03 UTC (rev 8355)
@@ -1518,7 +1518,7 @@
}
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 @@
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,
More information about the tor-commits
mailing list