summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-09-25 12:28:15 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-09-25 12:28:15 +0000
commit1c91a20427fe6af60bb385f695ce8768406fa194 (patch)
tree68cc27230c181774c2276018f21c1f770b4970e6 /syslogd.c
parent997b3ce610532178b4688a10415ee6af84e56fb5 (diff)
downloadrsyslog-1c91a20427fe6af60bb385f695ce8768406fa194.tar.gz
rsyslog-1c91a20427fe6af60bb385f695ce8768406fa194.tar.xz
rsyslog-1c91a20427fe6af60bb385f695ce8768406fa194.zip
applied contributed patch to improve repeated message processing (see
https://bugzilla.redhat.com/show_bug.cgi?id=303341)
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/syslogd.c b/syslogd.c
index 016e5d87..34e11d12 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2474,11 +2474,15 @@ static rsRetVal callAction(msg_t *pMsg, action_t *pAction)
if ((pAction->f_ReduceRepeated == 1) && pAction->f_pMsg != NULL &&
(pMsg->msgFlags & MARK) == 0 && getMSGLen(pMsg) == getMSGLen(pAction->f_pMsg) &&
!strcmp(getMSG(pMsg), getMSG(pAction->f_pMsg)) &&
- !strcmp(getHOSTNAME(pMsg), getHOSTNAME(pAction->f_pMsg))) {
+ !strcmp(getHOSTNAME(pMsg), getHOSTNAME(pAction->f_pMsg)) &&
+ !strcmp(getPROCID(pMsg), getPROCID(pAction->f_pMsg)) &&
+ !strcmp(getAPPNAME(pMsg), getAPPNAME(pAction->f_pMsg))) {
pAction->f_prevcount++;
dbgprintf("msg repeated %d times, %ld sec of %d.\n",
pAction->f_prevcount, now - pAction->f_time,
repeatinterval[pAction->f_repeatcount]);
+ MsgDestruct(pAction->f_pMsg);
+ pAction->f_pMsg = MsgAddRef(pMsg);
/* If domark would have logged this by now, flush it now (so we don't hold
* isolated messages), but back off so we'll flush less often in the future.
*/