diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-10 19:03:38 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-10 19:03:38 +0200 |
commit | 1c8fe77b78a64d69138b30ec28b430677b197601 (patch) | |
tree | 00fa6fb834c1ba9d185b989f641f133b5e552b0b /runtime/rule.c | |
parent | 6141845f7514622f77d308b7aadb15891d3a627a (diff) | |
download | rsyslog-1c8fe77b78a64d69138b30ec28b430677b197601.tar.gz rsyslog-1c8fe77b78a64d69138b30ec28b430677b197601.tar.xz rsyslog-1c8fe77b78a64d69138b30ec28b430677b197601.zip |
added $Ruleset config command
so we now can define multiple rule sets, we just can not use them ;)
That means we have the foundation to bind listeners to different
rule sets.
Diffstat (limited to 'runtime/rule.c')
-rw-r--r-- | runtime/rule.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runtime/rule.c b/runtime/rule.c index c157242c..f17c524e 100644 --- a/runtime/rule.c +++ b/runtime/rule.c @@ -320,6 +320,26 @@ CODESTARTobjDestruct(rule) ENDobjDestruct(rule) +/* set the associated ruleset */ +static rsRetVal +setAssRuleset(rule_t *pThis, ruleset_t *pRuleset) +{ + DEFiRet; + ISOBJ_TYPE_assert(pThis, rule); + ISOBJ_TYPE_assert(pRuleset, ruleset); + pThis->pRuleset = pRuleset; + RETiRet; +} + +/* get the associated ruleset (may be NULL if not set!) */ +static ruleset_t* +getAssRuleset(rule_t *pThis) +{ + ISOBJ_TYPE_assert(pThis, rule); + return pThis->pRuleset; +} + + /* helper to DebugPrint, to print out all actions via * the llExecFunc() facility. */ @@ -393,6 +413,8 @@ CODESTARTobjQueryInterface(rule) pIf->IterateAllActions = iterateAllActions; pIf->ProcessMsg = processMsg; + pIf->SetAssRuleset = setAssRuleset; + pIf->GetAssRuleset = getAssRuleset; finalize_it: ENDobjQueryInterface(rule) |