diff options
-rw-r--r-- | plugins/immark/immark.c | 3 | ||||
-rw-r--r-- | runtime/rsconf.c | 16 | ||||
-rw-r--r-- | runtime/rsconf.h | 1 |
3 files changed, 11 insertions, 9 deletions
diff --git a/plugins/immark/immark.c b/plugins/immark/immark.c index 6b46b29f..ae793e80 100644 --- a/plugins/immark/immark.c +++ b/plugins/immark/immark.c @@ -136,9 +136,6 @@ ENDrunInput BEGINwillRun CODESTARTwillRun - /* We set the global MarkInterval to what is configured here -- rgerhards, 2008-07-15 */ - if(MarkInterval == 0) - iRet = RS_RET_NO_RUN; ENDwillRun diff --git a/runtime/rsconf.c b/runtime/rsconf.c index 1e427d42..482622a1 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -375,8 +375,8 @@ runInputModules(void) BEGINfunc node = module.GetNxtCnfType(runConf, NULL, eMOD_IN); while(node != NULL) { - if(node->pMod->mod.im.bCanRun) { - /* activate here */ + if(node->canRun) { + DBGPRINTF("running module %s with config %p\n", node->pMod->pszName, node); bNeedsCancel = (node->pMod->isCompatibleWithFeature(sFEATURENonCancelInputTermination) == RS_RET_OK) ? 0 : 1; thrdCreate(node->pMod->mod.im.runInput, node->pMod->mod.im.afterRun, bNeedsCancel); @@ -399,10 +399,14 @@ startInputModules(void) node = module.GetNxtCnfType(runConf, NULL, eMOD_IN); while(node != NULL) { - iRet = node->pMod->mod.im.willRun(); - node->pMod->mod.im.bCanRun = (iRet == RS_RET_OK); - if(!node->pMod->mod.im.bCanRun) { - DBGPRINTF("module %lx will not run, iRet %d\n", (unsigned long) node->pMod, iRet); + if(node->canActivate) { + iRet = node->pMod->mod.im.willRun(); + node->canRun = (iRet == RS_RET_OK); + if(!node->canRun) { + DBGPRINTF("module %s will not run, iRet %d\n", node->pMod->pszName, iRet); + } + } else { + node->canRun = 0; } node = module.GetNxtCnfType(runConf, node, eMOD_IN); } diff --git a/runtime/rsconf.h b/runtime/rsconf.h index 0718566a..e26b1df6 100644 --- a/runtime/rsconf.h +++ b/runtime/rsconf.h @@ -99,6 +99,7 @@ struct cfgmodules_etry_s { /* the following data is input module specific */ void *modCnf; /* pointer to the input module conf */ sbool canActivate; /* OK to activate this config? */ + sbool canRun; /* OK to run this config? */ }; struct cfgmodules_s { |