From: Russ Combs Date: Mon, 25 Aug 2014 00:55:47 +0000 (-0400) Subject: deleted debug code X-Git-Tag: 3.0.0-233~1419^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8dbd327f70acbbd2c100477ebcc690c52450cfe1;p=thirdparty%2Fsnort3.git deleted debug code --- diff --git a/doc/style.txt b/doc/style.txt index 61e89f123..1d0ff80ce 100644 --- a/doc/style.txt +++ b/doc/style.txt @@ -35,7 +35,13 @@ yet firm so feedback is welcome to get something we can live with. med, or low priority. For now, H, M, or L can indicate alpha 1, 2, or 3. Perf changes fall between alpha 1 and 2. -==== Types +=== Logging + +* Don't output messages for the coder. Output messages that make + sense to the user. The function name doesn't belong in the error + message. + +=== Types * Use logical types to make the code clearer and to help the compiler catch problems. typedef uint16_t Port; bool foo(Port) is way better than @@ -48,7 +54,7 @@ yet firm so feedback is welcome to get something we can live with. * Use const liberally. -==== Formatting +=== Formatting * Indent 4 space chars ... no tabs! diff --git a/src/main/snort.cc b/src/main/snort.cc index 66f2318e4..66d6eeb6d 100644 --- a/src/main/snort.cc +++ b/src/main/snort.cc @@ -960,12 +960,8 @@ void snort_rotate() SetRotatePerfFileFlag(); } -int wtf_start[8]; -int wtf_stop[8]; - void snort_thread_init(const char* intf) { -++wtf_start[get_instance_id()]; // FIXIT-H the start-up sequence is a little off due to dropping privs DAQ_New(snort_conf, intf); DAQ_Start(); @@ -990,12 +986,10 @@ void snort_thread_init(const char* intf) IpsManager::setup_options(); ActionManager::thread_init(snort_conf); InspectorManager::thread_init(snort_conf); -++wtf_start[get_instance_id()]; } void snort_thread_term() { -++wtf_stop[get_instance_id()]; #ifdef PPM_MGR ppm_sum_stats(); #endif @@ -1025,6 +1019,5 @@ void snort_thread_term() SnortEventqFree(); Active_Term(); PacketManager::thread_term(); -++wtf_stop[get_instance_id()]; } diff --git a/src/managers/inspector_manager.cc b/src/managers/inspector_manager.cc index 466b1db17..e9f82bcd3 100644 --- a/src/managers/inspector_manager.cc +++ b/src/managers/inspector_manager.cc @@ -377,9 +377,6 @@ void InspectorManager::thread_init(SnortConfig* sc) { Inspector::slot = get_instance_id(); - if ( wtf_init[get_instance_id()]++ ) - return; - InspectionPolicy* pi = get_inspection_policy(); if ( !pi || !pi->framework_policy )