diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-05 10:00:47 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-05 10:00:47 +0100 |
commit | a57c8cea990afc9f36839408eea6bea8ddf8a4fe (patch) | |
tree | 799c44911c67cde0bc4ef8cbc23e62a266805d7c /grammar | |
parent | 73e7088748e560cd0c6d1ed7264951d32f64d060 (diff) | |
parent | 696c084e51ce49dc4a3f70642df469712eed8de6 (diff) | |
download | rsyslog-a57c8cea990afc9f36839408eea6bea8ddf8a4fe.tar.gz rsyslog-a57c8cea990afc9f36839408eea6bea8ddf8a4fe.tar.bz2 rsyslog-a57c8cea990afc9f36839408eea6bea8ddf8a4fe.zip |
Merge branch 'v7-stable-call-ruleset-queue' into v7-stable
Conflicts:
ChangeLog
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/rainerscript.c | 13 | ||||
-rw-r--r-- | grammar/rainerscript.h | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index b03e7c12..a1de6442 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -2279,7 +2279,8 @@ cnfstmtPrintOnly(struct cnfstmt *stmt, int indent, sbool subtree) break; case S_CALL: cstr = es_str2cstr(stmt->d.s_call.name, NULL); - doIndent(indent); dbgprintf("CALL [%s]\n", cstr); + doIndent(indent); dbgprintf("CALL [%s, queue:%d]\n", cstr, + stmt->d.s_call.ruleset == NULL ? 0 : 1); free(cstr); break; case S_ACT: @@ -3110,8 +3111,14 @@ cnfstmtOptimizeCall(struct cnfstmt *stmt) stmt->nodetype = S_NOP; goto done; } - DBGPRINTF("CALL obtained ruleset ptr %p for ruleset %s\n", pRuleset, rsName); - stmt->d.s_call.stmt = pRuleset->root; + DBGPRINTF("CALL obtained ruleset ptr %p for ruleset %s [hasQueue:%d]\n", + pRuleset, rsName, rulesetHasQueue(pRuleset)); + if(rulesetHasQueue(pRuleset)) { + stmt->d.s_call.ruleset = pRuleset; + } else { + stmt->d.s_call.ruleset = NULL; + stmt->d.s_call.stmt = pRuleset->root; + } done: free(rsName); return; diff --git a/grammar/rainerscript.h b/grammar/rainerscript.h index d00cc4c3..06573307 100644 --- a/grammar/rainerscript.h +++ b/grammar/rainerscript.h @@ -5,6 +5,7 @@ #include <typedefs.h> #include <sys/types.h> #include <regex.h> +#include "typedefs.h" #define LOG_NFACILITIES 24 /* current number of syslog facilities */ @@ -164,6 +165,7 @@ struct cnfstmt { struct { es_str_t *name; struct cnfstmt *stmt; + ruleset_t *ruleset; /* non-NULL if the ruleset has a queue assigned */ } s_call; struct { uchar pmask[LOG_NFACILITIES+1]; /* priority mask */ |