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:
Rainer Gerhards 2013-11-04 18:33:31 +01:00
parent 25b223c0dc
commit 9bbd09b1d3
2 changed files with 0 additions and 17 deletions

View File

@ -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) {

View File

@ -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);