summaryrefslogtreecommitdiffstats
path: root/runtime/modules.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-20 14:27:20 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-20 14:27:20 +0200
commit686540cebee2920341911860c0019e687174daa8 (patch)
treeecfc90cd67b22a83d039c950e605ef6264d1f311 /runtime/modules.c
parent58de33b9cea431d03e3e4bd539704d67d5398a90 (diff)
downloadrsyslog-686540cebee2920341911860c0019e687174daa8.tar.gz
rsyslog-686540cebee2920341911860c0019e687174daa8.tar.xz
rsyslog-686540cebee2920341911860c0019e687174daa8.zip
milestone: on the way to a new action conf interface to plugins...
Diffstat (limited to 'runtime/modules.c')
-rw-r--r--runtime/modules.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/runtime/modules.c b/runtime/modules.c
index 9ab03574..d09ba770 100644
--- a/runtime/modules.c
+++ b/runtime/modules.c
@@ -524,6 +524,15 @@ doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)(), modInfo_
ABORT_FINALIZE(localRet);
/* optional calls for new config system */
+ localRet = (*pNew->modQueryEtryPt)((uchar*)"getModCnfName", &getModCnfName);
+ if(localRet == RS_RET_OK) {
+ if(getModCnfName(&cnfName) == RS_RET_OK)
+ pNew->cnfName = (uchar*) strdup((char*)cnfName);
+ /**< we do not care if strdup() fails, we can accept that */
+ else
+ pNew->cnfName = NULL;
+ dbgprintf("module config name is '%s'\n", cnfName);
+ }
localRet = (*pNew->modQueryEtryPt)((uchar*)"beginCnfLoad", &pNew->beginCnfLoad);
if(localRet == RS_RET_OK) {
dbgprintf("module %s supports rsyslog v6 config interface\n", name);
@@ -537,11 +546,6 @@ doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)(), modInfo_
} else {
CHKiRet(localRet);
}
- CHKiRet((*pNew->modQueryEtryPt)((uchar*)"getModCnfName", &getModCnfName));
- getModCnfName(&cnfName);
- pNew->cnfName = (uchar*) strdup((char*)cnfName);
- /**< we do not care if strdup() fails, we can accept that */
- dbgprintf("module config name is '%s'\n", cnfName);
} else if(localRet == RS_RET_MODULE_ENTRY_POINT_NOT_FOUND) {
pNew->beginCnfLoad = NULL; /* flag as non-present */
} else {