From: Victor Julien Date: Wed, 17 Aug 2016 14:31:05 +0000 (+0200) Subject: detect: log earlier that rule reload is happening X-Git-Tag: suricata-3.1.2~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2191%2Fhead;p=thirdparty%2Fsuricata.git detect: log earlier that rule reload is happening --- diff --git a/src/detect-engine.c b/src/detect-engine.c index 3d35fb08de..9e54604149 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -665,8 +665,6 @@ static int DetectEngineReloadThreads(DetectEngineCtx *new_de_ctx) return 0; } - SCLogNotice("rule reload starting"); - /* prepare swap structures */ DetectEngineThreadCtx *old_det_ctx[no_of_detect_tvs]; DetectEngineThreadCtx *new_det_ctx[no_of_detect_tvs]; @@ -803,7 +801,6 @@ static int DetectEngineReloadThreads(DetectEngineCtx *new_de_ctx) SRepReloadComplete(); - SCLogNotice("rule reload complete"); return 1; error: @@ -2554,6 +2551,8 @@ int DetectEngineReload(SCInstance *suri) char prefix[128]; memset(prefix, 0, sizeof(prefix)); + SCLogNotice("rule reload starting"); + if (suri->conf_filename != NULL) { snprintf(prefix, sizeof(prefix), "detect-engine-reloads.%d", reloads++); if (ConfYamlLoadFileWithPrefix(suri->conf_filename, prefix) != 0) { @@ -2612,6 +2611,8 @@ int DetectEngineReload(SCInstance *suri) DetectEnginePruneFreeList(); SCLogDebug("old_de_ctx should have been freed"); + + SCLogNotice("rule reload complete"); return 0; }