summaryrefslogtreecommitdiffstats
path: root/runtime/wti.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-06-15 14:02:34 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-06-15 14:02:34 +0200
commit802f6d8a8f39e5ba578e0183e4500bef8e3a198c (patch)
tree6ebcee0347ee0f705edd0b1069bec3f49eb36060 /runtime/wti.c
parentfe8d317c1b40fe162891d5ddec1cb7df702bb7fe (diff)
downloadrsyslog-802f6d8a8f39e5ba578e0183e4500bef8e3a198c.tar.gz
rsyslog-802f6d8a8f39e5ba578e0183e4500bef8e3a198c.tar.xz
rsyslog-802f6d8a8f39e5ba578e0183e4500bef8e3a198c.zip
milestone(BUGGY): batch now pushed down to action
at least in important cases (not for non-direct action queues and some other minor things). This version is definitely buggy, but may be tried with success on a non-production system. I will continue to work on the correctness, but needed to commit now to get a baseline.
Diffstat (limited to 'runtime/wti.c')
-rw-r--r--runtime/wti.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/wti.c b/runtime/wti.c
index 307f1af1..9343f5c5 100644
--- a/runtime/wti.c
+++ b/runtime/wti.c
@@ -172,7 +172,7 @@ wtiCancelThrd(wti_t *pThis)
BEGINobjDestruct(wti) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(wti)
/* actual destruction */
- free(pThis->batch.pElem);
+ batchFree(&pThis->batch);
DESTROY_ATOMIC_HELPER_MUT(pThis->mutIsRunning);
free(pThis->pszDbgHdr);
@@ -204,7 +204,7 @@ wtiConstructFinalize(wti_t *pThis)
/* we now alloc the array for user pointers. We obtain the max from the queue itself. */
CHKiRet(pThis->pWtp->pfGetDeqBatchSize(pThis->pWtp->pUsr, &iDeqBatchSize));
- CHKmalloc(pThis->batch.pElem = calloc((size_t)iDeqBatchSize, sizeof(batch_obj_t)));
+ CHKiRet(batchInit(&pThis->batch, iDeqBatchSize));
finalize_it:
RETiRet;