return TM_ECODE_OK;
}
+/**
+ * \internal
+ * \brief This thread is an exact duplicate of DetectEngineThreadCtxInit(),
+ * except that the counters API 2 calls doesn't let us use the same
+ * init function. Once we have the new counters API it should let
+ * us use the same init function.
+ */
static TmEcode DetectEngineThreadCtxInitForLiveRuleSwap(ThreadVars *tv, void *initdata, void **data)
{
DetectEngineCtx *de_ctx = (DetectEngineCtx *)initdata;
return;
}
+void SignalHandlerSigusr2SigFileStartup(int sig)
+{
+ SCLogInfo("Live rule not possible if -s or -S option used at runtime.");
+
+ return;
+}
+
static void SignalHandlerSigusr2Idle(int sig)
{
if (run_mode == RUNMODE_UNKNOWN || run_mode == RUNMODE_UNITTEST) {
AppLayerHtpNeedFileInspection();
- UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2Idle);
+ if (sig_file == NULL)
+ UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2Idle);
+ else
+ UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2SigFileStartup);
#ifdef UNITTESTS
/* registering singal handlers we use. We register usr2 here, so that one
* can't call it during the first sig load phase */
- UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2);
+ if (sig_file == NULL)
+ UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2);
#ifdef PROFILING
SCProfilingInitRuleCounters(de_ctx);