]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Send a CRLF at the end of a STATUS_* event, not in the middle of it
authorRobert Ransom <rransom.8774@gmail.com>
Thu, 7 Jun 2012 03:22:06 +0000 (03:22 +0000)
committerRobert Ransom <rransom.8774@gmail.com>
Thu, 7 Jun 2012 03:22:06 +0000 (03:22 +0000)
Fixes bug 6094; bugfix on commit 3a9351b57e528b1d0bd2e72bcf78db7c91b2ff8f.

changes/bug6094 [new file with mode: 0644]
src/or/control.c

diff --git a/changes/bug6094 b/changes/bug6094
new file mode 100644 (file)
index 0000000..835d127
--- /dev/null
@@ -0,0 +1,8 @@
+  o Major bugfixes:
+
+    - Send a CRLF at the end of each STATUS_* control-port event.  A
+      change introduced in 0.2.3.16-alpha caused Tor to emit the CRLF
+      in the middle of a STATUS_* event; among other things, this
+      caused Vidalia to freeze.  Fixes bug 6094; bugfix on
+      0.2.3.16-alpha.
+
index 8aa4240f12a9f9996efa5d0c15cbc87fc8634be3..782468f6fe82d6eae569837a057f4aaeef7b22ad 100644 (file)
@@ -3957,14 +3957,14 @@ control_event_status(int type, int severity, const char *format, va_list args)
       log_warn(LD_BUG, "Unrecognized status severity %d", severity);
       return -1;
   }
-  if (tor_snprintf(format_buf, sizeof(format_buf), "650 %s %s\r\n",
+  if (tor_snprintf(format_buf, sizeof(format_buf), "650 %s %s",
                    status, sev)<0) {
     log_warn(LD_BUG, "Format string too long.");
     return -1;
   }
   tor_vasprintf(&user_buf, format, args);
 
-  send_control_event(type, ALL_FORMATS, "%s %s", format_buf, user_buf);
+  send_control_event(type, ALL_FORMATS, "%s %s\r\n", format_buf, user_buf);
   tor_free(user_buf);
   return 0;
 }