summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/omgssapi/omgssapi.c1
-rw-r--r--plugins/omlibdbi/omlibdbi.c1
-rw-r--r--plugins/ommail/ommail.c1
-rw-r--r--plugins/ommysql/ommysql.c1
-rw-r--r--plugins/ompgsql/ompgsql.c1
-rw-r--r--plugins/omprog/omprog.c1
-rw-r--r--plugins/omrelp/omrelp.c1
-rw-r--r--plugins/omruleset/omruleset.c1
-rw-r--r--plugins/omsnmp/omsnmp.c1
-rw-r--r--plugins/omstdout/omstdout.c1
-rw-r--r--plugins/omtemplate/omtemplate.c1
-rw-r--r--plugins/omtesting/omtesting.c1
-rw-r--r--plugins/omudpspoof/omudpspoof.c1
-rw-r--r--runtime/module-template.h4
-rw-r--r--runtime/modules.h4
-rwxr-xr-xtests/diag.sh6
-rw-r--r--tools/omdiscard.c1
-rw-r--r--tools/omfile.c1
-rw-r--r--tools/omfwd.c1
-rw-r--r--tools/ompipe.c1
-rw-r--r--tools/omshell.c1
-rw-r--r--tools/omusrmsg.c1
22 files changed, 29 insertions, 4 deletions
diff --git a/plugins/omgssapi/omgssapi.c b/plugins/omgssapi/omgssapi.c
index e7d8f01..224ec50 100644
--- a/plugins/omgssapi/omgssapi.c
+++ b/plugins/omgssapi/omgssapi.c
@@ -699,6 +699,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/plugins/omlibdbi/omlibdbi.c b/plugins/omlibdbi/omlibdbi.c
index bb85cf7..3ccd8b9 100644
--- a/plugins/omlibdbi/omlibdbi.c
+++ b/plugins/omlibdbi/omlibdbi.c
@@ -352,6 +352,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/plugins/ommail/ommail.c b/plugins/ommail/ommail.c
index dae36f6..e3f2497 100644
--- a/plugins/ommail/ommail.c
+++ b/plugins/ommail/ommail.c
@@ -705,6 +705,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
/* tell which objects we need */
diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c
index b12bb84..5b44d68 100644
--- a/plugins/ommysql/ommysql.c
+++ b/plugins/ommysql/ommysql.c
@@ -317,6 +317,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/plugins/ompgsql/ompgsql.c b/plugins/ompgsql/ompgsql.c
index 67d5dec..4a9bb90 100644
--- a/plugins/ompgsql/ompgsql.c
+++ b/plugins/ompgsql/ompgsql.c
@@ -361,6 +361,7 @@ ENDqueryEtryPt
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/plugins/omprog/omprog.c b/plugins/omprog/omprog.c
index c667b53..89d475d 100644
--- a/plugins/omprog/omprog.c
+++ b/plugins/omprog/omprog.c
@@ -348,6 +348,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index 1ebc6b8..bfa12f8 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -336,6 +336,7 @@ ENDqueryEtryPt
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
/* create our relp engine */
diff --git a/plugins/omruleset/omruleset.c b/plugins/omruleset/omruleset.c
index 97078ca..9ce4d66 100644
--- a/plugins/omruleset/omruleset.c
+++ b/plugins/omruleset/omruleset.c
@@ -213,6 +213,7 @@ BEGINmodInit()
unsigned long opts;
int bMsgPassingSupported; /* does core support template passing as an array? */
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
/* check if the rsyslog core supports parameter passing code */
diff --git a/plugins/omsnmp/omsnmp.c b/plugins/omsnmp/omsnmp.c
index fcba915..918367b 100644
--- a/plugins/omsnmp/omsnmp.c
+++ b/plugins/omsnmp/omsnmp.c
@@ -514,6 +514,7 @@ ENDqueryEtryPt
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/plugins/omstdout/omstdout.c b/plugins/omstdout/omstdout.c
index 2fe3e35..184ec8e 100644
--- a/plugins/omstdout/omstdout.c
+++ b/plugins/omstdout/omstdout.c
@@ -196,6 +196,7 @@ BEGINmodInit()
unsigned long opts;
int bArrayPassingSupported; /* does core support template passing as an array? */
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
/* check if the rsyslog core supports parameter passing code */
diff --git a/plugins/omtemplate/omtemplate.c b/plugins/omtemplate/omtemplate.c
index ae04356..d0ee9e8 100644
--- a/plugins/omtemplate/omtemplate.c
+++ b/plugins/omtemplate/omtemplate.c
@@ -217,6 +217,7 @@ resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unus
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/plugins/omtesting/omtesting.c b/plugins/omtesting/omtesting.c
index 4885123..9bb77fc 100644
--- a/plugins/omtesting/omtesting.c
+++ b/plugins/omtesting/omtesting.c
@@ -316,6 +316,7 @@ ENDqueryEtryPt
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(omsdRegCFSLineHdlr((uchar *)"actionomtestingechostdout", 0, eCmdHdlrBinary, NULL,
diff --git a/plugins/omudpspoof/omudpspoof.c b/plugins/omudpspoof/omudpspoof.c
index 81118e2..684e54d 100644
--- a/plugins/omudpspoof/omudpspoof.c
+++ b/plugins/omudpspoof/omudpspoof.c
@@ -484,6 +484,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
BEGINmodInit()
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(glbl, CORE_COMPONENT));
diff --git a/runtime/module-template.h b/runtime/module-template.h
index 95ac286..f0084ea 100644
--- a/runtime/module-template.h
+++ b/runtime/module-template.h
@@ -521,6 +521,10 @@ rsRetVal modInit##uniqName(int iIFVersRequested __attribute__((unused)), int *ip
/* now get the obj interface so that we can access other objects */ \
CHKiRet(pObjGetObjInterface(&obj));
+/* do those initializations necessary for scoping */
+#define SCOPINGmodInit \
+ initConfVars();
+
#define ENDmodInit \
finalize_it:\
*pQueryEtryPt = queryEtryPt;\
diff --git a/runtime/modules.h b/runtime/modules.h
index 556a3e3..9569512 100644
--- a/runtime/modules.h
+++ b/runtime/modules.h
@@ -47,8 +47,10 @@
* version 5 changes the way parsing works for input modules. This is
* an important change, parseAndSubmitMessage() goes away. Other
* module types are not affected. -- rgerhards, 2008-10-09
+ * version 6 introduces scoping support (starting with the output
+ * modules) -- rgerhards, 2010-07-27
*/
-#define CURR_MOD_IF_VERSION 5
+#define CURR_MOD_IF_VERSION 6
typedef enum eModType_ {
eMOD_IN = 0, /* input module */
diff --git a/tests/diag.sh b/tests/diag.sh
index 3acf2b6..2f30775 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -5,13 +5,13 @@
# not always able to convey back states to the upper-level test driver
# begun 2009-05-27 by rgerhards
# This file is part of the rsyslog project, released under GPLv3
-valgrind="valgrind --malloc-fill=ff --free-fill=fe --log-fd=1"
+#valgrind="valgrind --malloc-fill=ff --free-fill=fe --log-fd=1"
#valgrind="valgrind --tool=drd --log-fd=1"
#valgrind="valgrind --tool=helgrind --log-fd=1"
#valgrind="valgrind --tool=exp-ptrcheck --log-fd=1"
#set -o xtrace
-export RSYSLOG_DEBUG="debug nostdout"
-export RSYSLOG_DEBUGLOG="log"
+#export RSYSLOG_DEBUG="debug nostdout"
+#export RSYSLOG_DEBUGLOG="log"
case $1 in
'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
cp $srcdir/testsuites/diag-common.conf diag-common.conf
diff --git a/tools/omdiscard.c b/tools/omdiscard.c
index 5e3295f..4b8ab82 100644
--- a/tools/omdiscard.c
+++ b/tools/omdiscard.c
@@ -124,6 +124,7 @@ ENDqueryEtryPt
BEGINmodInit(Discard)
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
ENDmodInit
diff --git a/tools/omfile.c b/tools/omfile.c
index 7c78047..522cab4 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -908,6 +908,7 @@ BEGINmodInit(File)
CODESTARTmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
+SCOPINGmodInit
CHKiRet(objUse(errmsg, CORE_COMPONENT));
CHKiRet(objUse(strm, CORE_COMPONENT));
diff --git a/tools/omfwd.c b/tools/omfwd.c
index 5240e06..6a42292 100644
--- a/tools/omfwd.c
+++ b/tools/omfwd.c
@@ -759,6 +759,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
BEGINmodInit(Fwd)
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(glbl, CORE_COMPONENT));
diff --git a/tools/ompipe.c b/tools/ompipe.c
index e8ace07..c243543 100644
--- a/tools/ompipe.c
+++ b/tools/ompipe.c
@@ -244,6 +244,7 @@ ENDqueryEtryPt
BEGINmodInit(Pipe)
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/tools/omshell.c b/tools/omshell.c
index dbc6034..45934bc 100644
--- a/tools/omshell.c
+++ b/tools/omshell.c
@@ -148,6 +148,7 @@ ENDqueryEtryPt
BEGINmodInit(Shell)
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
diff --git a/tools/omusrmsg.c b/tools/omusrmsg.c
index 8c556f5..ec4bf6d 100644
--- a/tools/omusrmsg.c
+++ b/tools/omusrmsg.c
@@ -342,6 +342,7 @@ ENDqueryEtryPt
BEGINmodInit(UsrMsg)
CODESTARTmodInit
+SCOPINGmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));