diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-08-09 05:16:29 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-08-09 05:16:29 +0000 |
commit | 742796c19f79eb16a35499be1072a68edb4f3bd6 (patch) | |
tree | 2e4f7f73fdb274e98e7459090f4a2580eeb38219 /src | |
parent | f9f600f032d2ae37853682c204b03b5244635557 (diff) | |
download | tor-742796c19f79eb16a35499be1072a68edb4f3bd6.tar.gz tor-742796c19f79eb16a35499be1072a68edb4f3bd6.zip |
Avoid sending blank lines when GETINFO replies should be empty
svn:r4754
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/control.c b/src/or/control.c index f0be50952d..7fd4698274 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1197,7 +1197,7 @@ handle_getinfo_helper(const char *question, char **answer) smartlist_add(status, s); tor_free(path); } - *answer = smartlist_join_strings(status, "\r\n", 1, NULL); + *answer = smartlist_join_strings(status, "\r\n", 0, NULL); SMARTLIST_FOREACH(status, char *, cp, tor_free(cp)); smartlist_free(status); } else if (!strcmp(question, "stream-status")) { @@ -1247,7 +1247,7 @@ handle_getinfo_helper(const char *question, char **answer) buf); smartlist_add(status, s); } - *answer = smartlist_join_strings(status, "\r\n", 1, NULL); + *answer = smartlist_join_strings(status, "\r\n", 0, NULL); SMARTLIST_FOREACH(status, char *, cp, tor_free(cp)); smartlist_free(status); } else if (!strcmp(question, "orconn-status")) { @@ -1270,7 +1270,7 @@ handle_getinfo_helper(const char *question, char **answer) tor_snprintf(s, slen, "%s %s",conns[i]->nickname,state); smartlist_add(status, s); } - *answer = smartlist_join_strings(status, "\r\n", 1, NULL); + *answer = smartlist_join_strings(status, "\r\n", 0, NULL); SMARTLIST_FOREACH(status, char *, cp, tor_free(cp)); smartlist_free(status); } else if (!strcmpstart(question, "addr-mappings/")) { @@ -1289,7 +1289,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", 1, NULL); + *answer = smartlist_join_strings(mappings, "\n", 0, NULL); SMARTLIST_FOREACH(mappings, char *, cp, tor_free(cp)); smartlist_free(mappings); } |