summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-06-23 12:48:27 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-06-23 12:48:27 +0200
commitf48128f34a17aae7e7b9405fe32b396db45443ca (patch)
treea122a65d4a2495570b5d8662fd75a1104cb0c521 /runtime/queue.c
parentd6a3b08f56cc608bc832251cd49e86e71d9574dc (diff)
downloadrsyslog-f48128f34a17aae7e7b9405fe32b396db45443ca.tar.gz
rsyslog-f48128f34a17aae7e7b9405fe32b396db45443ca.tar.xz
rsyslog-f48128f34a17aae7e7b9405fe32b396db45443ca.zip
fixed a couple of regressions
by implementing some code that was missing so far ;) as well as finding some real bugs. I also did some general cleanup, removing debug strings and such. This code should be fairly OK to use, except when "exec only when previous action was suspended" is used -- this is NOT yet re-implemented in the tuned engine.
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index 5e9c67ca..60d17086 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -852,8 +852,11 @@ static rsRetVal qAddDirect(qqueue_t *pThis, void* pUsr)
* We use our knowledge about the batch_t structure below, but without that, we
* pay a too-large performance toll... -- rgerhards, 2009-04-22
*/
+ memset(&batchObj, 0, sizeof(batch_obj_t));
+ memset(&singleBatch, 0, sizeof(batch_t));
batchObj.state = BATCH_STATE_RDY;
batchObj.pUsrp = (obj_t*) pUsr;
+ batchObj.bFilterOK = 1;
singleBatch.nElem = 1; /* there always is only one in direct mode */
singleBatch.pElem = &batchObj;
iRet = pThis->pConsumer(pThis->pUsr, &singleBatch, &pThis->bShutdownImmediate);
@@ -862,7 +865,9 @@ static rsRetVal qAddDirect(qqueue_t *pThis, void* pUsr)
RETiRet;
}
-/*** EXPERIMENTAL ***/
+/* "enqueue" a batch in direct mode. This is a shortcut which saves all the overhead
+ * otherwise incured. -- rgerhards, ~2010-06-23
+ */
rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch)
{
DEFiRet;