summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Bartos <mbartos@redhat.com>2012-07-31 17:16:51 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-08-01 10:42:10 +0200
commit3be7fbf868b6df3817781f927e448bd72ef1f83a (patch)
tree2607c8aa1298db0ea92958414798bc08792a1ecf
parent686270440c601d5a4e3eac246397f60248889f5f (diff)
downloadrsyslog-3be7fbf868b6df3817781f927e448bd72ef1f83a.tar.gz
rsyslog-3be7fbf868b6df3817781f927e448bd72ef1f83a.tar.xz
rsyslog-3be7fbf868b6df3817781f927e448bd72ef1f83a.zip
fix problem with cutting first 16 characters from message with bAnnotate on modified: plugins/imuxsock/imuxsock.c
-rw-r--r--plugins/imuxsock/imuxsock.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index 2d26e652..fe04c8f2 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -859,7 +859,11 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred, struct tim
fixPID(bufParseTAG, &i, cred);
MsgSetTAG(pMsg, bufParseTAG, i);
- MsgSetMSGoffs(pMsg, pMsg->iLenRawMsg - lenMsg);
+ if (pLstn->bAnnotate) {
+ MsgSetMSGoffs(pMsg, pMsg->iLenRawMsg - lenMsg - 16);
+ } else {
+ MsgSetMSGoffs(pMsg, pMsg->iLenRawMsg - lenMsg);
+ }
if(pLstn->bParseHost) {
pMsg->msgFlags = pLstn->flags | PARSE_HOSTNAME;