summaryrefslogtreecommitdiffstats
path: root/runtime/modules.c
diff options
context:
space:
mode:
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 {