aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2012-06-07 03:22:06 +0000
committerRobert Ransom <rransom.8774@gmail.com>2012-06-07 03:22:06 +0000
commit0dc47dfebffe9547bc95ba3f2a64fc5f4b15f270 (patch)
tree0596bfad275a5d635f2c92c331cae266e104227d /src/or
parent491dc3a601d7c2610503f73192bd1a40bcb37ab2 (diff)
downloadtor-0dc47dfebffe9547bc95ba3f2a64fc5f4b15f270.tar
tor-0dc47dfebffe9547bc95ba3f2a64fc5f4b15f270.tar.gz
Send a CRLF at the end of a STATUS_* event, not in the middle of it
Fixes bug 6094; bugfix on commit 3a9351b57e528b1d0bd2e72bcf78db7c91b2ff8f.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/control.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 8aa4240f1..782468f6f 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -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;
}