From c129ddcc637875442dbf9e0869f5eafbd08199ae Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 27 Jan 2012 11:08:58 +0100 Subject: bugfix: action stats did invalidly contain already-discarded messages --- action.c | 7 ++++--- configure.ac | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/action.c b/action.c index 7226e7d6..f16146c1 100644 --- a/action.c +++ b/action.c @@ -1575,7 +1575,8 @@ countStatsBatchEnq(action_t *pAction, batch_t *pBatch) { int i; for(i = 0 ; i < batchNumMsgs(pBatch) && !*(pBatch->pbShutdownImmediate) ; ++i) { - if(pBatch->pElem[i].bFilterOK) { + if( pBatch->pElem[i].bFilterOK + && pBatch->pElem[i].state != BATCH_STATE_DISC) { STATSCOUNTER_INC(pAction->ctrProcessed, pAction->mutCtrProcessed); } } @@ -1617,7 +1618,7 @@ doQueueEnqObjDirectBatch(action_t *pAction, batch_t *pBatch) pBatch->pElem[i].bFilterOK = 0; bModifiedFilter = 1; } - if(pBatch->pElem[i].bFilterOK) { + if(pBatch->pElem[i].bFilterOK && pBatch->pElem[i].state != BATCH_STATE_DISC) { STATSCOUNTER_INC(pAction->ctrProcessed, pAction->mutCtrProcessed); bNeedSubmit = 1; } @@ -1629,7 +1630,7 @@ doQueueEnqObjDirectBatch(action_t *pAction, batch_t *pBatch) /* note: stats were already computed above */ iRet = qqueueEnqObjDirectBatch(pAction->pQueue, pBatch); } else { - DBGPRINTF("no need to submit batch, all bFilterOK==0\n"); + DBGPRINTF("no need to submit batch, all bFilterOK==0 or discarded\n"); } if(bModifiedFilter) { for(i = 0 ; i < batchNumMsgs(pBatch) ; ++i) { diff --git a/configure.ac b/configure.ac index 0e9240e5..c6d775af 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[5.8.6-newstats5],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[5.8.6-newstats6],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -- cgit v1.2.3