From 1ae10b9a42048e4024cac30726bf65e142e813eb Mon Sep 17 00:00:00 2001 From: Xavier Lange Date: Mon, 19 Mar 2012 03:58:36 -0700 Subject: [PATCH] Do not spawn threads for conf test --- src/suricata.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/suricata.c b/src/suricata.c index 401db38d41..388a4b62ee 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1710,7 +1710,12 @@ int main(int argc, char **argv) } } - RunModeDispatch(run_mode, runmode_custom_mode, de_ctx); + if(conf_test == 1){ + SCLogInfo("Configuration provided was successfully loaded. Exiting."); + exit(EXIT_SUCCESS); + } else { + RunModeDispatch(run_mode, runmode_custom_mode, de_ctx); + } #ifdef __SC_CUDA_SUPPORT__ if (PatternMatchDefaultMatcher() == MPM_B2G_CUDA) { @@ -1743,13 +1748,8 @@ int main(int argc, char **argv) SC_ATOMIC_CAS(&engine_stage, SURICATA_INIT, SURICATA_RUNTIME); - if(conf_test == 1){ - SCLogInfo("Configuration provided was successfully loaded. Exiting."); - exit(EXIT_SUCCESS); - } else { - /* Un-pause all the paused threads */ - TmThreadContinueThreads(); - } + /* Un-pause all the paused threads */ + TmThreadContinueThreads(); #ifdef DBG_MEM_ALLOC SCLogInfo("Memory used at startup: %"PRIdMAX, (intmax_t)global_mem);