detect: consolidate more setup into DetectEngineCtxInit

Loading of classifications, references and action order was done
unconditionally, so can be done in one place.
pull/1386/head
Victor Julien 10 years ago
parent 69f99245c5
commit 49bad2cfba

@ -551,13 +551,6 @@ static void *DetectEngineLiveRuleSwap(void *arg)
goto error;
}
SCClassConfLoadClassficationConfigFile(de_ctx);
SCRConfLoadReferenceConfigFile(de_ctx);
if (ActionInitConfig() < 0) {
exit(EXIT_FAILURE);
}
if (SigLoadSignatures(de_ctx, NULL, FALSE) < 0) {
SCLogError(SC_ERR_NO_RULES_LOADED, "Loading signatures failed.");
if (de_ctx->failure_fatal)
@ -879,6 +872,13 @@ DetectEngineCtx *DetectEngineCtxInit(void)
SCProfilingKeywordInitCounters(de_ctx);
#endif
SCClassConfLoadClassficationConfigFile(de_ctx);
SCRConfLoadReferenceConfigFile(de_ctx);
if (ActionInitConfig() < 0) {
goto error;
}
return de_ctx;
error:
return NULL;

@ -2312,12 +2312,6 @@ int main(int argc, char **argv)
CudaVarsSetDeCtx(de_ctx);
#endif /* __SC_CUDA_SUPPORT__ */
SCClassConfLoadClassficationConfigFile(de_ctx);
SCRConfLoadReferenceConfigFile(de_ctx);
if (ActionInitConfig() < 0) {
exit(EXIT_FAILURE);
}
} else {
/* disable raw reassembly */
(void)ConfSetFinal("stream.reassembly.raw", "false");

Loading…
Cancel
Save