diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-20 14:27:20 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-20 14:27:20 +0200 |
commit | 686540cebee2920341911860c0019e687174daa8 (patch) | |
tree | ecfc90cd67b22a83d039c950e605ef6264d1f311 /runtime/modules.c | |
parent | 58de33b9cea431d03e3e4bd539704d67d5398a90 (diff) | |
download | rsyslog-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.c | 14 |
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 { |