From 9b0d03bf8f5eb89d5a1966df16187c5c6757c578 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 26 Jun 2012 17:18:20 +0200 Subject: 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. --- runtime/modules.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime') 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; } } -- cgit v1.2.3