syslogd: Fix RFC3164 TAG formatting when no PID is included

This patch fixes the omission of final ':' following a content TAG when
an app-name without a process ID is included.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-11-12 16:41:09 +01:00
parent d92f8466f8
commit 69608f7158

View File

@ -1343,8 +1343,9 @@ static int fmt3164(struct buf_msg *buffer, char *fmt, struct iovec *iov, size_t
if (buffer->proc_id) {
pushiov(iov, i, "[");
pushiov(iov, i, buffer->proc_id);
pushiov(iov, i, "]:");
pushiov(iov, i, "]");
}
pushiov(iov, i, ":");
pushsp(iov, i);
}