summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-06-26 17:18:20 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-06-26 17:18:20 +0200
commit9b0d03bf8f5eb89d5a1966df16187c5c6757c578 (patch)
tree493195572faf2e97d083d0834bf9132d1da3d73f /runtime
parentb950b862289ce668b98e2a6bbb6e2c48445b2e47 (diff)
downloadrsyslog-9b0d03bf8f5eb89d5a1966df16187c5c6757c578.tar.gz
rsyslog-9b0d03bf8f5eb89d5a1966df16187c5c6757c578.tar.xz
rsyslog-9b0d03bf8f5eb89d5a1966df16187c5c6757c578.zip
modules: call new-style entry point only when new-style stmt is used
This provides a way for modules to differentiate between old- and new- style config, so that they can react accordingly.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/modules.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/modules.c b/runtime/modules.c
index 6417cecd..bc8580f1 100644
--- a/runtime/modules.c
+++ b/runtime/modules.c
@@ -1011,7 +1011,8 @@ Load(uchar *pModName, sbool bConfLoad, struct nvlst *lst)
* because there is no way to set parameters at load
* time for obvious reasons...
*/
- pModInfo->setModCnf(lst);
+ if(lst != NULL)
+ pModInfo->setModCnf(lst);
pModInfo->bSetModCnfCalled = 1;
}
}
@@ -1128,7 +1129,8 @@ Load(uchar *pModName, sbool bConfLoad, struct nvlst *lst)
if(bConfLoad) {
addModToCnfList(pModInfo);
if(pModInfo->setModCnf != NULL) {
- pModInfo->setModCnf(lst);
+ if(lst != NULL)
+ pModInfo->setModCnf(lst);
pModInfo->bSetModCnfCalled = 1;
}
}