diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-01-27 11:08:58 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-01-27 11:08:58 +0100 |
commit | c129ddcc637875442dbf9e0869f5eafbd08199ae (patch) | |
tree | 9b58b087b2b1cd334e8fe033b126acf049a879e6 /action.c | |
parent | 590252c2275da8d4ed777a3bb84a227327b3871a (diff) | |
download | rsyslog-c129ddcc637875442dbf9e0869f5eafbd08199ae.tar.gz rsyslog-c129ddcc637875442dbf9e0869f5eafbd08199ae.tar.xz rsyslog-c129ddcc637875442dbf9e0869f5eafbd08199ae.zip |
bugfix: action stats did invalidly contain already-discarded messages
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) { |