summaryrefslogtreecommitdiffstats
path: root/grammar
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-11-05 10:01:22 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-11-05 10:01:22 +0100
commit938eff729c581657eb84c0ea0a7a6665ecd040be (patch)
treedc494f3b3bfd716b691ca82edd80aa6f450ecec3 /grammar
parent70b8ba19a314a1ce9fdb01062fcd7dd470882a8a (diff)
parenta57c8cea990afc9f36839408eea6bea8ddf8a4fe (diff)
downloadrsyslog-938eff729c581657eb84c0ea0a7a6665ecd040be.tar.gz
rsyslog-938eff729c581657eb84c0ea0a7a6665ecd040be.tar.bz2
rsyslog-938eff729c581657eb84c0ea0a7a6665ecd040be.zip
Merge branch 'v7-stable'
Diffstat (limited to 'grammar')
-rw-r--r--grammar/rainerscript.c13
-rw-r--r--grammar/rainerscript.h2
2 files changed, 12 insertions, 3 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 53839474..0dad86cc 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -2423,7 +2423,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:
@@ -3254,8 +3255,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 001dff4e..377dde90 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 */
#define CNFFUNC_MAX_ARGS 32
@@ -170,6 +171,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 */