From 1c91a20427fe6af60bb385f695ce8768406fa194 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 25 Sep 2007 12:28:15 +0000 Subject: applied contributed patch to improve repeated message processing (see https://bugzilla.redhat.com/show_bug.cgi?id=303341) --- syslogd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'syslogd.c') 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. */ -- cgit v1.2.3