diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-01-23 18:19:19 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-01-23 18:19:19 +0100 |
commit | b826c0d3c53bc9da7014d8e75f6e3db8853b7c19 (patch) | |
tree | b3db136363f60d648fb8e1cbe8bea88226e2dc74 /plugins/imklog/imklog.c | |
parent | b68af9a016c229259ccb259c33e6598a3a77ea35 (diff) | |
parent | cca05921dcfab557a4743a56c78683e4c1113e2a (diff) | |
download | rsyslog-b826c0d3c53bc9da7014d8e75f6e3db8853b7c19.tar.gz rsyslog-b826c0d3c53bc9da7014d8e75f6e3db8853b7c19.tar.bz2 rsyslog-b826c0d3c53bc9da7014d8e75f6e3db8853b7c19.zip |
Merge branch 'v5-devel' & fix bug in BSD imklog driver
Conflicts:
plugins/imklog/ksym.c
plugins/imklog/linux.c
Diffstat (limited to 'plugins/imklog/imklog.c')
-rw-r--r-- | plugins/imklog/imklog.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c index 609d5eb4..b52b67af 100644 --- a/plugins/imklog/imklog.c +++ b/plugins/imklog/imklog.c @@ -216,15 +216,14 @@ rsRetVal Syslog(int priority, uchar *pMsg, struct timeval *tp) DEFiRet; /* then check if we have two PRIs. This can happen in case of systemd, - * in which case the second PRI is the rigth one. - * TODO: added kernel timestamp support to this PoC. -- rgerhards, 2011-03-18 + * in which case the second PRI is the right one. */ - if(pMsg[3] == '<') { /* could be a pri... */ - uchar *pMsgTmp = pMsg + 3; + if(pMsg[3] == '<' || (pMsg[3] == ' ' && pMsg[4] == '<')) { /* could be a pri... */ + uchar *pMsgTmp = pMsg + ((pMsg[3] == '<') ? 3 : 4); localRet = parsePRI(&pMsgTmp, &pri); if(localRet == RS_RET_OK && pri >= 8 && pri <= 192) { /* *this* is our PRI */ - DBGPRINTF("imklog detected secondary PRI in klog msg\n"); + DBGPRINTF("imklog detected secondary PRI(%d) in klog msg\n", pri); pMsg = pMsgTmp; priority = pri; } |