From 6d01ce9ca3ce11c43e3944b789f2c14b006fbc1a Mon Sep 17 00:00:00 2001 From: "Oleksandr Stepanov -X (ostepano - SOFTSERVE INC at Cisco)" Date: Tue, 6 Aug 2024 19:17:01 +0000 Subject: [PATCH] Pull request #4408: control: cleanup code Merge in SNORT/snort3 from ~OSTEPANO/snort3:cleanup_control to master Squashed commit of the following: commit dcccfa9baccc02c0efa32e7592834457d6e9f1a1 Author: Oleksandr Stepanov Date: Fri Aug 2 06:28:22 2024 -0400 control: Code cleanup --- src/main.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.cc b/src/main.cc index 690f95b22..d6928f46b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1142,10 +1142,11 @@ static void main_loop() pthreads_started = pigs_started_count && num_threads <= pigs_started_count + pigs_failed; -#ifdef REG_TEST if (pthreads_started) { +#ifdef REG_TEST LogMessage("All pthreads started\n"); +#endif #ifdef SHELL if (use_shell(SnortConfig::get_conf())) @@ -1155,11 +1156,9 @@ static void main_loop() } #endif } -#endif } -#ifdef SHELL - if(!pthreads_running) + if (!pthreads_running) { const unsigned num_threads = (!Trough::has_next()) ? max_swine : max_pigs; unsigned pigs_running_count = 0; @@ -1172,7 +1171,6 @@ static void main_loop() pthreads_running = pigs_running_count && num_threads <= pigs_running_count + pigs_failed; } -#endif if ( !exit_requested and (swine < max_pigs) and (src = Trough::get_next()) ) { -- 2.47.3