summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-11 08:45:51 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-11 08:45:51 +0000
commit8203dc8bb8f9a1b8ac928a14333c4aeefa63efa6 (patch)
treeeb41a7356ef642a98ec5fabb7c9dd85198d08812 /syslogd.c
parent13d90a23862797c89405b4a8ab921d79734eb0c0 (diff)
downloadrsyslog-8203dc8bb8f9a1b8ac928a14333c4aeefa63efa6.tar.gz
rsyslog-8203dc8bb8f9a1b8ac928a14333c4aeefa63efa6.tar.xz
rsyslog-8203dc8bb8f9a1b8ac928a14333c4aeefa63efa6.zip
bugfix: trailing ":" of tag was lost while parsing legacy syslog messages
without timestamp - thanks to Anders Blomdell for providing a patch!
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/syslogd.c b/syslogd.c
index e87e99a3..7434c8b7 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2042,7 +2042,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';