diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-15 14:02:34 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-15 14:02:34 +0200 |
commit | 802f6d8a8f39e5ba578e0183e4500bef8e3a198c (patch) | |
tree | 6ebcee0347ee0f705edd0b1069bec3f49eb36060 /runtime/rule.c | |
parent | fe8d317c1b40fe162891d5ddec1cb7df702bb7fe (diff) | |
download | rsyslog-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/rule.c')
-rw-r--r-- | runtime/rule.c | 11 |
1 files changed, 7 insertions, 4 deletions
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) { |