summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2011-08-18 09:36:59 +0200
committerAndre Lorbach <alorbach@adiscon.com>2011-08-18 09:36:59 +0200
commit47ed9921b6c9fe49d4aadf244f7df1ce4d05a5b3 (patch)
treea1a9c778194da1ea12426779183f02b8a439acce /runtime
parent33bf53cdab0689bd7f100aca5f09dd6b69da0e94 (diff)
downloadrsyslog-47ed9921b6c9fe49d4aadf244f7df1ce4d05a5b3.tar.gz
rsyslog-47ed9921b6c9fe49d4aadf244f7df1ce4d05a5b3.tar.xz
rsyslog-47ed9921b6c9fe49d4aadf244f7df1ce4d05a5b3.zip
bugfix: fixed incorrect state handling for Discard Action (transactions)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queue.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index 00eb76c7..554c6a43 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -88,6 +88,15 @@ static rsRetVal qqueueMultiEnqObjDirect(qqueue_t *pThis, multi_submit_t *pMultiS
#define QUEUE_CHECKPOINT 1
#define QUEUE_NO_CHECKPOINT 0
+/* debug aid */
+static void displayBatchState(batch_t *pBatch)
+{
+ int i;
+ for(i = 0 ; i < pBatch->nElem ; ++i) {
+ dbgprintf("XXXXX: displayBatchState %p[%d]: %d\n", pBatch, i, pBatch->pElem[i].state);
+ }
+}
+
/***********************************************************************
* we need a private data structure, the "to-delete" list. As C does
* not provide any partly private data structures, we implement this
@@ -882,6 +891,8 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch)
ASSERT(pThis != NULL);
+dbgprintf("XXXXX: pre call consumer\n");
+displayBatchState(pBatch);
/* calling the consumer is quite different here than it is from a worker thread */
/* we need to provide the consumer's return value back to the caller because in direct
* mode the consumer probably has a lot to convey (which get's lost in the other modes
@@ -892,6 +903,8 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch)
*/
iRet = pThis->pConsumer(pThis->pUsr, pBatch, &pThis->bShutdownImmediate);
+dbgprintf("XXXXX: post call consumer\n");
+displayBatchState(pBatch);
RETiRet;
}