]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Do not spawn threads for conf test
authorXavier Lange <xrlange@gmail.com>
Mon, 19 Mar 2012 10:58:36 +0000 (03:58 -0700)
committerVictor Julien <victor@inliniac.net>
Fri, 23 Mar 2012 17:28:10 +0000 (18:28 +0100)
src/suricata.c

index 401db38d417a2d3e61c3e95a81e01b01db4d4a1e..388a4b62ee071d18936b9d120546760a5f6a3fa5 100644 (file)
@@ -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);