diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-06-26 11:16:32 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-06-26 11:16:32 +0200 |
commit | 696c084e51ce49dc4a3f70642df469712eed8de6 (patch) | |
tree | 5272e38099c6eb5fada9bab61487950fe32520ac /grammar | |
parent | 752e1c4b863346fe6eb8b6bc66d1d3bc3d346d13 (diff) | |
download | rsyslog-696c084e51ce49dc4a3f70642df469712eed8de6.tar.gz rsyslog-696c084e51ce49dc4a3f70642df469712eed8de6.tar.bz2 rsyslog-696c084e51ce49dc4a3f70642df469712eed8de6.zip |
bugfix: call to ruleset with async queue did not use the queue
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=443
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 95972fbe..a7828839 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -2274,7 +2274,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: @@ -3089,8 +3090,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 31b2eb93..7debc420 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 */ |