mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 05:10:40 +01:00
cleanup: multiple rulesets inside a single batch are now OK
They don't require special handling any longer, so do no longer care about them.
This commit is contained in:
parent
25b223c0dc
commit
9bbd09b1d3
@ -70,7 +70,6 @@ struct batch_s {
|
||||
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 */
|
||||
batch_state_t *eltState;/* state (array!) for individual objects.
|
||||
NOTE: we have moved this out of batch_obj_t because we
|
||||
@ -82,13 +81,6 @@ struct batch_s {
|
||||
};
|
||||
|
||||
|
||||
/* some inline functions (we may move this off to an object .. or not) */
|
||||
static inline void
|
||||
batchSetSingleRuleset(batch_t *pBatch, sbool val) {
|
||||
pBatch->bSingleRuleset = val;
|
||||
}
|
||||
|
||||
|
||||
/* get number of msgs for this batch */
|
||||
static inline int
|
||||
batchNumMsgs(batch_t *pBatch) {
|
||||
|
||||
@ -503,17 +503,12 @@ preprocessBatch(batch_t *pBatch) {
|
||||
prop_t *localName;
|
||||
prop_t *propFromHost = NULL;
|
||||
prop_t *propFromHostIP = NULL;
|
||||
int bSingleRuleset;
|
||||
ruleset_t *batchRuleset; /* the ruleset used for all message inside the batch, if there is a single one */
|
||||
int bIsPermitted;
|
||||
msg_t *pMsg;
|
||||
int i;
|
||||
rsRetVal localRet;
|
||||
DEFiRet;
|
||||
|
||||
bSingleRuleset = 1;
|
||||
batchRuleset = (pBatch->nElem > 0) ? pBatch->pElem[0].pMsg->pRuleset : NULL;
|
||||
|
||||
for(i = 0 ; i < pBatch->nElem && !*(pBatch->pbShutdownImmediate) ; i++) {
|
||||
pMsg = pBatch->pElem[i].pMsg;
|
||||
if((pMsg->msgFlags & NEEDS_ACLCHK_U) != 0) {
|
||||
@ -539,12 +534,8 @@ preprocessBatch(batch_t *pBatch) {
|
||||
pBatch->eltState[i] = BATCH_STATE_DISC;
|
||||
}
|
||||
}
|
||||
if(pMsg->pRuleset != batchRuleset)
|
||||
bSingleRuleset = 0;
|
||||
}
|
||||
|
||||
batchSetSingleRuleset(pBatch, bSingleRuleset);
|
||||
|
||||
finalize_it:
|
||||
if(propFromHost != NULL)
|
||||
prop.Destruct(&propFromHost);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user