summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-11 08:47:15 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-11 08:47:15 +0000
commit91b54ed246977cb961977ca400c19b6d5b107583 (patch)
tree5c5b7494423b4225d4847e8a03c52a71beb55b6d
parenta745208787f3b2752e17d3171ca3e2a2f4f0d5c4 (diff)
downloadrsyslog-91b54ed246977cb961977ca400c19b6d5b107583.tar.gz
rsyslog-91b54ed246977cb961977ca400c19b6d5b107583.tar.xz
rsyslog-91b54ed246977cb961977ca400c19b6d5b107583.zip
bugfix: trailing ":" of tag was lost while parsing legacy syslog messages
without timestamp - thanks to Anders Blomdell for providing a patch!
-rw-r--r--ChangeLog2
-rw-r--r--syslogd.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 172f3f31..4f2f70a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,8 @@ Version 2.0.2 STABLE (rgerhards), 2008-02-??
- bugfix: errno could be changed during mark processing, leading to
invalid error messages when processing inputs. Thank to varmojfekoj for
pointing out this problem.
+- bugfix: trailing ":" of tag was lost while parsing legacy syslog messages
+ without timestamp - thanks to Anders Blomdell for providing a patch!
---------------------------------------------------------------------------
Version 2.0.1 STABLE (rgerhards), 2008-01-24
- fixed a bug in integer conversion - but this function was never called,
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';