summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2011-08-18 15:41:22 +0200
committerAndre Lorbach <alorbach@adiscon.com>2011-08-18 15:41:22 +0200
commit53135efb4e793da3eb94d9e42c340484192aefcf (patch)
tree804f0b982ec849c8b0b128be8847e722ecfa5694 /action.c
parent803462104b4eb319c05ea0f6e30c0b04548a1ed0 (diff)
parent154747929f87010b444af2d552f980daafe451e6 (diff)
downloadrsyslog-53135efb4e793da3eb94d9e42c340484192aefcf.tar.gz
rsyslog-53135efb4e793da3eb94d9e42c340484192aefcf.tar.xz
rsyslog-53135efb4e793da3eb94d9e42c340484192aefcf.zip
Merge branch 'v5-stable' into v5-devel
Conflicts: configure.ac
Diffstat (limited to 'action.c')
-rw-r--r--action.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/action.c b/action.c
index 5940fa97..dfac8d4f 100644
--- a/action.c
+++ b/action.c
@@ -985,13 +985,17 @@ dbgprintf("XXXXX: tryDoAction %p, pnElem %d, nElem %d\n", pAction, *pnElem,
/* mark messages as committed */
while(iCommittedUpTo <= i) {
pBatch->pElem[iCommittedUpTo].bPrevWasSuspended = 0; /* we had success! */
- pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM;
+ batchSetElemState(pBatch, iCommittedUpTo, BATCH_STATE_COMM);
+ ++iCommittedUpTo;
+ //pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM;
}
} else if(localRet == RS_RET_PREVIOUS_COMMITTED) {
/* mark messages as committed */
while(iCommittedUpTo < i) {
pBatch->pElem[iCommittedUpTo].bPrevWasSuspended = 0; /* we had success! */
- pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM;
+ batchSetElemState(pBatch, iCommittedUpTo, BATCH_STATE_COMM);
+ ++iCommittedUpTo;
+ //pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM;
}
pBatch->pElem[i].state = BATCH_STATE_SUB;
} else if(localRet == RS_RET_DEFER_COMMIT) {
@@ -1016,6 +1020,15 @@ finalize_it:
RETiRet;
}
+/* debug aid */
+static void displayBatchState(batch_t *pBatch)
+{
+ int i;
+ for(i = 0 ; i < pBatch->nElem ; ++i) {
+ dbgprintf("XXXXX: displayBatchState2 %p[%d]: %d\n", pBatch, i, pBatch->pElem[i].state);
+ }
+}
+
/* submit a batch for actual action processing.
* The first nElem elements are processed. This function calls itself