From 802f6d8a8f39e5ba578e0183e4500bef8e3a198c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 15 Jun 2010 14:02:34 +0200 Subject: 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. --- runtime/rule.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'runtime/rule.c') diff --git a/runtime/rule.c b/runtime/rule.c index c28e15c9..453e631d 100644 --- a/runtime/rule.c +++ b/runtime/rule.c @@ -108,16 +108,19 @@ DEFFUNC_llExecFunc(processBatchDoActions) } #endif - // NEW (potentially): iRetMod = actionSubmit(pAction, (batch_t*) pParam); +#if 1 + // NEW (potentially): + iRetMod = doSubmitToActionQBatch(pAction, (batch_t*) pParam); +#else // old code -- milestone check -dbgprintf("ZZZ: inside processBatchDoActions, begin processing (nElem=%d)\n", batchNumMsgs(pBatch)); int i; for(i = 0 ; i < batchNumMsgs(pBatch) && !*(pBatch->pbShutdownImmediate) ; ++i) { -dbgprintf("ZZZ: inside processBatchDoActions, processind elem %d/%d\n", i, batchNumMsgs(pBatch)); +dbgprintf("ZZZ: inside processBatchDoActions, processing elem %d/%d\n", i, batchNumMsgs(pBatch)); if(pBatch->pElem[i].bFilterOK) { iRetMod = pAction->submitToActQ(pAction, (msg_t*)(pBatch->pElem[i].pUsrp)); } } +#endif //end old code #if 0 // TODO: this must be done inside the action as well! if(iRetMod == RS_RET_DISCARDMSG) { @@ -297,7 +300,7 @@ processBatch(rule_t *pThis, batch_t *pBatch) DEFiRet; ISOBJ_TYPE_assert(pThis, rule); - assert(pMsg != NULL); + assert(pBatch != NULL); /* first check the filters... */ for(i = 0 ; i < batchNumMsgs(pBatch) && !*(pBatch->pbShutdownImmediate) ; ++i) { -- cgit