[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8355: fix encoding in "getinfo addr-mappings" response. fix error (tor/trunk/src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r8355: fix encoding in "getinfo addr-mappings" response. fix error (tor/trunk/src/or)
- From: arma@xxxxxxxx
- Date: Fri, 8 Sep 2006 23:38:03 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 08 Sep 2006 23:38:13 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
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,