summaryrefslogtreecommitdiffstats
path: root/grammar
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-29 16:22:20 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-29 16:22:20 +0100
commit343df920c9b1b469daefde1688459234e4b29d73 (patch)
treed4cb2f72da036dbe07130b7d42a0e15e5dbf9363 /grammar
parent64a4358384699478babd8bd90c724c171b1c549f (diff)
parentffc64138fdc6a40b0ee4dca290900ca4a3965f24 (diff)
downloadrsyslog-343df920c9b1b469daefde1688459234e4b29d73.tar.gz
rsyslog-343df920c9b1b469daefde1688459234e4b29d73.tar.bz2
rsyslog-343df920c9b1b469daefde1688459234e4b29d73.zip
Merge branch 'master' into master-ruleeng
Diffstat (limited to 'grammar')
-rw-r--r--grammar/rainerscript.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 30c36201..76b91940 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -2469,7 +2469,9 @@ cnfstmtPrintOnly(struct cnfstmt *stmt, int indent, sbool subtree)
doIndent(indent); dbgprintf("PROPFILT\n");
doIndent(indent); dbgprintf("\tProperty.: '%s'\n",
propIDToName(stmt->d.s_propfilt.prop.id));
- if(stmt->d.s_propfilt.prop.name != NULL) {
+ if(stmt->d.s_propfilt.prop.id == PROP_CEE ||
+ stmt->d.s_propfilt.prop.id == PROP_LOCAL_VAR ||
+ stmt->d.s_propfilt.prop.id == PROP_GLOBAL_VAR) {
doIndent(indent);
dbgprintf("\tCEE-Prop.: '%s'\n", stmt->d.s_propfilt.prop.name);
}
@@ -3068,12 +3070,15 @@ cnfexprOptimize(struct cnfexpr *expr)
expr->r = exprswap;
}
}
- if(expr->l->nodetype == 'V') {
- expr = cnfexprOptimize_CMP_var(expr);
- }
if(expr->r->nodetype == 'A') {
cnfexprOptimize_CMPEQ_arr((struct cnfarray *)expr->r);
}
+ /* This should be evaluated last because it may change expr
+ * to a function.
+ */
+ if(expr->l->nodetype == 'V') {
+ expr = cnfexprOptimize_CMP_var(expr);
+ }
break;
case CMP_LE:
case CMP_GE: