diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-19 09:41:45 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-19 09:41:45 +0200 |
commit | 90e8475260cf8ac54519b3d964d879489af879f6 (patch) | |
tree | cf072344f5a41b2485f6ad320c408d4f5fe0d903 /action.c | |
parent | a4344f350151cdb9172897709fa08680ec8587ba (diff) | |
download | rsyslog-90e8475260cf8ac54519b3d964d879489af879f6.tar.gz rsyslog-90e8475260cf8ac54519b3d964d879489af879f6.tar.xz rsyslog-90e8475260cf8ac54519b3d964d879489af879f6.zip |
bugfix: message processing states were not set correctly in all cases
however, this had no negative effect, as the message processing state
was not evaluated when a batch was deleted, and that was the only case
where the state could be wrong.
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -821,12 +821,12 @@ tryDoAction(action_t *pAction, batch_t *pBatch, int *pnElem) DBGPRINTF("action call returned %d\n", localRet); if(localRet == RS_RET_OK) { /* mark messages as committed */ - while(iCommittedUpTo < i) { + while(iCommittedUpTo <= i) { pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM; } } else if(localRet == RS_RET_PREVIOUS_COMMITTED) { /* mark messages as committed */ - while(iCommittedUpTo < i - 1) { + while(iCommittedUpTo < i) { pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM; } pBatch->pElem[i].state = BATCH_STATE_SUB; @@ -838,6 +838,7 @@ tryDoAction(action_t *pAction, batch_t *pBatch, int *pnElem) iRet = localRet; FINALIZE; } +dbgprintf("XXX: submitBatch set element %d state to %d\n", i, pBatch->pElem[i].state); } ++i; ++iElemProcessed; @@ -871,6 +872,7 @@ submitBatch(action_t *pAction, batch_t *pBatch, int nElem) bDone = 0; do { +dbgprintf("XXX: submitBatch in loop, batch size %d\n", nElem); localRet = tryDoAction(pAction, pBatch, &nElem); if( localRet == RS_RET_OK || localRet == RS_RET_PREVIOUS_COMMITTED |