[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Avoid sending blank lines when GETINFO replies should be em...



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv25426/src/or

Modified Files:
	control.c 
Log Message:
Avoid sending blank lines when GETINFO replies should be empty

Index: control.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- control.c	8 Aug 2005 17:48:23 -0000	1.115
+++ control.c	9 Aug 2005 05:16:29 -0000	1.116
@@ -1197,7 +1197,7 @@
       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 @@
                    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 @@
       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 @@
     }
     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);
   }