diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-12-16 14:23:38 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-12-16 14:23:38 +0100 |
commit | b9ba5013ad39dbf60a0a3bc06c38870a803451fd (patch) | |
tree | 731f063626eb09d199211b31e2e3b6415c59e614 /action.c | |
parent | 189a26c0444178612bf6e4618ccd9c722b83c261 (diff) | |
download | rsyslog-b9ba5013ad39dbf60a0a3bc06c38870a803451fd.tar.gz rsyslog-b9ba5013ad39dbf60a0a3bc06c38870a803451fd.tar.xz rsyslog-b9ba5013ad39dbf60a0a3bc06c38870a803451fd.zip |
bugfix: batch processing flagged invalid message as "bad" under some circumstances
also fixed some cosmetic nits
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -971,7 +971,7 @@ submitBatch(action_t *pAction, batch_t *pBatch, int nElem) ; /* do nothing, this will retry the full batch */ } else if(localRet == RS_RET_ACTION_FAILED) { /* in this case, everything not yet committed is BAD */ - for(i = pBatch->iDoneUpTo ; i < nElem ; ++i) { + for(i = pBatch->iDoneUpTo ; i < pBatch->iDoneUpTo + nElem ; ++i) { if( pBatch->pElem[i].state != BATCH_STATE_DISC && pBatch->pElem[i].state != BATCH_STATE_COMM ) { pBatch->pElem[i].state = BATCH_STATE_BAD; @@ -981,7 +981,7 @@ submitBatch(action_t *pAction, batch_t *pBatch, int nElem) bDone = 1; } else { if(nElem == 1) { - batchSetElemState(pBatch, i, BATCH_STATE_BAD); + batchSetElemState(pBatch, pBatch->iDoneUpTo, BATCH_STATE_BAD); bDone = 1; } else { /* retry with half as much. Depth is log_2 batchsize, so recursion is not too deep */ |