summaryrefslogtreecommitdiffstats
path: root/runtime/ruleset.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ruleset.c')
-rw-r--r--runtime/ruleset.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/runtime/ruleset.c b/runtime/ruleset.c
index 16cb7cb3..66b38fc9 100644
--- a/runtime/ruleset.c
+++ b/runtime/ruleset.c
@@ -181,7 +181,7 @@ processBatchMultiRuleset(batch_t *pBatch)
do {
bHaveUnprocessed = 0;
/* search for first unprocessed element */
- for(iStart = 0 ; iStart < pBatch->nElem && pBatch->pElem[iStart].state == BATCH_STATE_DISC ; ++iStart)
+ for(iStart = 0 ; iStart < pBatch->nElem && pBatch->eltState[iStart] == BATCH_STATE_DISC ; ++iStart)
/* just search, no action */;
if(iStart == pBatch->nElem)
break; /* everything processed */
@@ -195,10 +195,10 @@ processBatchMultiRuleset(batch_t *pBatch)
if(batchElemGetRuleset(pBatch, i) == currRuleset) {
/* for performance reasons, we copy only those members that we actually need */
snglRuleBatch.pElem[iNew].pMsg = pBatch->pElem[i].pMsg;
- snglRuleBatch.pElem[iNew].state = pBatch->pElem[i].state;
+ snglRuleBatch.eltState[iNew] = pBatch->eltState[i];
++iNew;
/* We indicate the element also as done, so it will not be processed again */
- pBatch->pElem[i].state = BATCH_STATE_DISC;
+ pBatch->eltState[i] = BATCH_STATE_DISC;
} else {
bHaveUnprocessed = 1;
}
@@ -242,7 +242,7 @@ execSet(struct cnfstmt *stmt, batch_t *pBatch, sbool *active)
struct var result;
DEFiRet;
for(i = 0 ; i < batchNumMsgs(pBatch) && !*(pBatch->pbShutdownImmediate) ; ++i) {
- if( pBatch->pElem[i].state != BATCH_STATE_DISC
+ if( pBatch->eltState[i] != BATCH_STATE_DISC
&& (active == NULL || active[i])) {
cnfexprEval(stmt->d.s_set.expr, &result, pBatch->pElem[i].pMsg);
msgSetJSONFromVar(pBatch->pElem[i].pMsg, stmt->d.s_set.varname,
@@ -259,7 +259,7 @@ execUnset(struct cnfstmt *stmt, batch_t *pBatch, sbool *active)
int i;
DEFiRet;
for(i = 0 ; i < batchNumMsgs(pBatch) && !*(pBatch->pbShutdownImmediate) ; ++i) {
- if( pBatch->pElem[i].state != BATCH_STATE_DISC
+ if( pBatch->eltState[i] != BATCH_STATE_DISC
&& (active == NULL || active[i])) {
msgUnsetJSON(pBatch->pElem[i].pMsg, stmt->d.s_unset.varname);
}
@@ -277,9 +277,9 @@ execStop(batch_t *pBatch, sbool *active)
int i;
DEFiRet;
for(i = 0 ; i < batchNumMsgs(pBatch) && !*(pBatch->pbShutdownImmediate) ; ++i) {
- if( pBatch->pElem[i].state != BATCH_STATE_DISC
+ if( pBatch->eltState[i] != BATCH_STATE_DISC
&& (active == NULL || active[i])) {
- pBatch->pElem[i].state = BATCH_STATE_DISC;
+ pBatch->eltState[i] = BATCH_STATE_DISC;
}
}
RETiRet;
@@ -302,7 +302,7 @@ execIf(struct cnfstmt *stmt, batch_t *pBatch, sbool *active)
for(i = 0 ; i < batchNumMsgs(pBatch) ; ++i) {
if(*(pBatch->pbShutdownImmediate))
FINALIZE;
- if(pBatch->pElem[i].state == BATCH_STATE_DISC)
+ if(pBatch->eltState[i] == BATCH_STATE_DISC)
continue; /* will be ignored in any case */
if(active == NULL || active[i]) {
bRet = cnfexprEvalBool(stmt->d.s_if.expr, pBatch->pElem[i].pMsg);
@@ -319,7 +319,7 @@ execIf(struct cnfstmt *stmt, batch_t *pBatch, sbool *active)
for(i = 0 ; i < batchNumMsgs(pBatch) ; ++i) {
if(*(pBatch->pbShutdownImmediate))
FINALIZE;
- if(pBatch->pElem[i].state != BATCH_STATE_DISC)
+ if(pBatch->eltState[i] != BATCH_STATE_DISC)
newAct[i] = !newAct[i];
}
scriptExec(stmt->d.s_if.t_else, pBatch, newAct);
@@ -341,7 +341,7 @@ execPRIFILT(struct cnfstmt *stmt, batch_t *pBatch, sbool *active)
for(i = 0 ; i < batchNumMsgs(pBatch) ; ++i) {
if(*(pBatch->pbShutdownImmediate))
return;
- if(pBatch->pElem[i].state == BATCH_STATE_DISC)
+ if(pBatch->eltState[i] == BATCH_STATE_DISC)
continue; /* will be ignored in any case */
pMsg = pBatch->pElem[i].pMsg;
if(active == NULL || active[i]) {
@@ -364,7 +364,7 @@ execPRIFILT(struct cnfstmt *stmt, batch_t *pBatch, sbool *active)
for(i = 0 ; i < batchNumMsgs(pBatch) ; ++i) {
if(*(pBatch->pbShutdownImmediate))
return;
- if(pBatch->pElem[i].state != BATCH_STATE_DISC)
+ if(pBatch->eltState[i] != BATCH_STATE_DISC)
newAct[i] = !newAct[i];
}
scriptExec(stmt->d.s_prifilt.t_else, pBatch, newAct);
@@ -473,7 +473,7 @@ execPROPFILT(struct cnfstmt *stmt, batch_t *pBatch, sbool *active)
for(i = 0 ; i < batchNumMsgs(pBatch) ; ++i) {
if(*(pBatch->pbShutdownImmediate))
return;
- if(pBatch->pElem[i].state == BATCH_STATE_DISC)
+ if(pBatch->eltState[i] == BATCH_STATE_DISC)
continue; /* will be ignored in any case */
if(active == NULL || active[i]) {
bRet = evalPROPFILT(stmt, pBatch->pElem[i].pMsg);