diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-12 11:10:48 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-12 11:10:48 +0200 |
commit | 99f342e866c6c4a257c0a504ce7e561e21458847 (patch) | |
tree | 76bbc755f42e07a4be51877cebce30eac7d7ece9 /runtime/batch.h | |
parent | 50abcd483b422e3e4f0b67a925fa8cdf71936f12 (diff) | |
download | rsyslog-99f342e866c6c4a257c0a504ce7e561e21458847.tar.gz rsyslog-99f342e866c6c4a257c0a504ce7e561e21458847.tar.xz rsyslog-99f342e866c6c4a257c0a504ce7e561e21458847.zip |
new ruleengine: fixed action handling in regard to filters
This was not yet adapted to the new "active" structure.
Diffstat (limited to 'runtime/batch.h')
-rw-r--r-- | runtime/batch.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/batch.h b/runtime/batch.h index 944889bd..fdacb8e2 100644 --- a/runtime/batch.h +++ b/runtime/batch.h @@ -51,7 +51,6 @@ struct batch_obj_s { /* work variables for action processing; these are reused for each action (or block of * actions) */ - sbool bFilterOK; /* work area for filter processing (per action, reused!) */ sbool bPrevWasSuspended; /* following are caches to save allocs if not absolutely necessary */ uchar *staticActStrings[CONF_OMOD_NUMSTRINGS_MAXSIZE]; /**< for strings */ @@ -83,6 +82,7 @@ struct batch_s { int iDoneUpTo; /* all messages below this index have state other than RDY */ qDeqID deqID; /* ID of dequeue operation that generated this batch */ int *pbShutdownImmediate;/* end processing of this batch immediately if set to 1 */ + sbool *active; /* which messages are active for processing, NULL=all */ sbool bSingleRuleset; /* do all msgs of this batch use a single ruleset? */ batch_obj_t *pElem; /* batch elements */ }; @@ -129,7 +129,8 @@ batchSetElemState(batch_t *pBatch, int i, batch_state_t newState) { */ static inline int batchIsValidElem(batch_t *pBatch, int i) { - return(pBatch->pElem[i].bFilterOK && pBatch->pElem[i].state != BATCH_STATE_DISC); + return( (pBatch->active == NULL || pBatch->active[i]) + && pBatch->pElem[i].state != BATCH_STATE_DISC); } |