From 91b54ed246977cb961977ca400c19b6d5b107583 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 11 Feb 2008 08:47:15 +0000 Subject: bugfix: trailing ":" of tag was lost while parsing legacy syslog messages without timestamp - thanks to Anders Blomdell for providing a patch! --- syslogd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index ad740524..57fffbfe 100644 --- a/syslogd.c +++ b/syslogd.c @@ -3113,7 +3113,9 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags) */ if(*p2parse == ':') { bTAGCharDetected = 1; - ++p2parse; + /* We will move hostname to tag, so preserve ':' (otherwise we + * will needlessly change the message format) */ + *pWork++ = *p2parse++; } else if(*p2parse == ' ') ++p2parse; *pWork = '\0'; -- cgit v1.2.3