summaryrefslogtreecommitdiffstats
path: root/grammar
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-11-20 14:10:08 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-11-20 14:10:08 +0100
commit89030a107ef46286196d7ffae8e992138bbd7e69 (patch)
tree1346b4fdb91e55bf1a50b84fbc49df1e9b7466aa /grammar
parentb8f839de86a29924a3b4b16d36f6cc7331a4a2d4 (diff)
downloadrsyslog-89030a107ef46286196d7ffae8e992138bbd7e69.tar.gz
rsyslog-89030a107ef46286196d7ffae8e992138bbd7e69.tar.bz2
rsyslog-89030a107ef46286196d7ffae8e992138bbd7e69.zip
bugfix: RainerScript optimizer did not optimize PRI filters
things like "if $syslogfacility-text == "local3"" were not converted to PRIFILT. This was a regression introduced in 7.5.6.
Diffstat (limited to 'grammar')
-rw-r--r--grammar/rainerscript.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index ecc23b54..e4f85860 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -2884,7 +2884,7 @@ cnfexprOptimize_CMP_severity_facility(struct cnfexpr *expr)
if(expr->l->nodetype != 'V')
FINALIZE;
- if(!strcmp("$syslogseverity", ((struct cnfvar*)expr->l)->name)) {
+ if(!strcmp("syslogseverity", ((struct cnfvar*)expr->l)->name)) {
if(expr->r->nodetype == 'N') {
int sev = (int) ((struct cnfnumval*)expr->r)->val;
if(sev >= 0 && sev <= 7) {
@@ -2898,7 +2898,7 @@ cnfexprOptimize_CMP_severity_facility(struct cnfexpr *expr)
"evaluate to FALSE", sev);
}
}
- } else if(!strcmp("$syslogfacility", ((struct cnfvar*)expr->l)->name)) {
+ } else if(!strcmp("syslogfacility", ((struct cnfvar*)expr->l)->name)) {
if(expr->r->nodetype == 'N') {
int fac = (int) ((struct cnfnumval*)expr->r)->val;
if(fac >= 0 && fac <= 24) {
@@ -2926,7 +2926,7 @@ cnfexprOptimize_CMP_var(struct cnfexpr *expr)
{
struct cnffunc *func;
- if(!strcmp("$syslogfacility-text", ((struct cnfvar*)expr->l)->name)) {
+ if(!strcmp("syslogfacility-text", ((struct cnfvar*)expr->l)->name)) {
if(expr->r->nodetype == 'S') {
char *cstr = es_str2cstr(((struct cnfstringval*)expr->r)->estr, NULL);
int fac = decodeSyslogName((uchar*)cstr, syslogFacNames);
@@ -2944,7 +2944,7 @@ cnfexprOptimize_CMP_var(struct cnfexpr *expr)
}
free(cstr);
}
- } else if(!strcmp("$syslogseverity-text", ((struct cnfvar*)expr->l)->name)) {
+ } else if(!strcmp("syslogseverity-text", ((struct cnfvar*)expr->l)->name)) {
if(expr->r->nodetype == 'S') {
char *cstr = es_str2cstr(((struct cnfstringval*)expr->r)->estr, NULL);
int sev = decodeSyslogName((uchar*)cstr, syslogPriNames);