From b9ba5013ad39dbf60a0a3bc06c38870a803451fd Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 16 Dec 2010 14:23:38 +0100 Subject: bugfix: batch processing flagged invalid message as "bad" under some circumstances also fixed some cosmetic nits --- action.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'action.c') diff --git a/action.c b/action.c index 0d298673..9591c393 100644 --- a/action.c +++ b/action.c @@ -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 */ -- cgit