summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-15 15:01:30 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-15 15:01:30 +0200
commite579791a78267353566c79c83043805a54d85b74 (patch)
treeca0fdb7558eef3fea13139bf5c7aaf7055ae8446 /runtime
parent384cf4702406a69825190ce0e28cfbcd1e3ccb8e (diff)
downloadrsyslog-e579791a78267353566c79c83043805a54d85b74.tar.gz
rsyslog-e579791a78267353566c79c83043805a54d85b74.tar.xz
rsyslog-e579791a78267353566c79c83043805a54d85b74.zip
more cleanup
Diffstat (limited to 'runtime')
-rw-r--r--runtime/rsconf.c6
-rw-r--r--runtime/ruleset.c4
-rw-r--r--runtime/ruleset.h11
3 files changed, 12 insertions, 9 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index 5df4c2c8..0ccf2d57 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -403,7 +403,7 @@ void cnfDoRule(struct cnfrule *cnfrule)
cnfDoActlst(cnfrule->actlst, pRule);
- CHKiRet(ruleset.AddRule(loadConf, rule.GetAssRuleset(pRule), &pRule));
+ CHKiRet(ruleset.AddRule(rule.GetAssRuleset(pRule), &pRule));
finalize_it:
//TODO: do something with error states
@@ -832,7 +832,7 @@ setCurrRuleset(void __attribute__((unused)) *pVal, uchar *pszName)
if(localRet == RS_RET_NOT_FOUND) {
DBGPRINTF("begin new current rule set '%s'\n", pszName);
CHKiRet(ruleset.Construct(&pRuleset));
- CHKiRet(ruleset.SetName(ourConf, pRuleset, pszName));
+ CHKiRet(ruleset.SetName(pRuleset, pszName));
CHKiRet(ruleset.ConstructFinalize(ourConf, pRuleset));
} else {
ABORT_FINALIZE(localRet);
@@ -1030,7 +1030,7 @@ initLegacyConf(void)
DBGPRINTF("doing legacy config system init\n");
/* construct the default ruleset */
ruleset.Construct(&pRuleset);
- ruleset.SetName(loadConf, pRuleset, UCHAR_CONSTANT("RSYSLOG_DefaultRuleset"));
+ ruleset.SetName(pRuleset, UCHAR_CONSTANT("RSYSLOG_DefaultRuleset"));
ruleset.ConstructFinalize(loadConf, pRuleset);
/* now register config handlers */
diff --git a/runtime/ruleset.c b/runtime/ruleset.c
index d472a560..23007a63 100644
--- a/runtime/ruleset.c
+++ b/runtime/ruleset.c
@@ -252,7 +252,7 @@ GetParserList(rsconf_t *conf, msg_t *pMsg)
* of checks and ignore the rule if it does not pass them.
*/
static rsRetVal
-addRule(rsconf_t *conf, ruleset_t *pThis, rule_t **ppRule)
+addRule(ruleset_t *pThis, rule_t **ppRule)
{
int iActionCnt;
DEFiRet;
@@ -275,7 +275,7 @@ finalize_it:
/* set name for ruleset */
-static rsRetVal setName(rsconf_t *conf, ruleset_t *pThis, uchar *pszName)
+static rsRetVal setName(ruleset_t *pThis, uchar *pszName)
{
DEFiRet;
free(pThis->pszName);
diff --git a/runtime/ruleset.h b/runtime/ruleset.h
index 8966a884..83b06947 100644
--- a/runtime/ruleset.h
+++ b/runtime/ruleset.h
@@ -2,7 +2,7 @@
*
* This implements rulesets within rsyslog.
*
- * Copyright 2009 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2009-2011 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -46,8 +46,8 @@ BEGINinterface(ruleset) /* name must also be changed in ENDinterface macro! */
rsRetVal (*Destruct)(ruleset_t **ppThis);
rsRetVal (*IterateAllActions)(rsconf_t *conf, rsRetVal (*pFunc)(void*, void*), void* pParam);
rsRetVal (*DestructAllActions)(rsconf_t *conf);
- rsRetVal (*AddRule)(rsconf_t *conf, ruleset_t *pThis, rule_t **ppRule);
- rsRetVal (*SetName)(rsconf_t *conf, ruleset_t *pThis, uchar *pszName);
+ rsRetVal (*AddRule)(ruleset_t *pThis, rule_t **ppRule);
+ rsRetVal (*SetName)(ruleset_t *pThis, uchar *pszName);
rsRetVal (*ProcessBatch)(batch_t*);
rsRetVal (*GetRuleset)(rsconf_t *conf, ruleset_t **ppThis, uchar*);
rsRetVal (*SetDefaultRuleset)(rsconf_t *conf, uchar*);
@@ -58,9 +58,12 @@ BEGINinterface(ruleset) /* name must also be changed in ENDinterface macro! */
parserList_t* (*GetParserList)(rsconf_t *conf, msg_t *);
/* v5, 2011-04-19
* added support for the rsconf object -- fundamental change
+ * v6, 2011-07-15
+ * removed conf ptr from SetName, AddRule as the flex/bison based
+ * system uses globals in any case.
*/
ENDinterface(ruleset)
-#define rulesetCURR_IF_VERSION 5 /* increment whenever you change the interface structure! */
+#define rulesetCURR_IF_VERSION 6 /* increment whenever you change the interface structure! */
/* prototypes */