From: Joel Cornett Date: Wed, 6 Apr 2016 19:02:33 +0000 (-0400) Subject: fixed flow warnings X-Git-Tag: 3.0.0-233~472^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce3f3f32aefba9a6619044fdcc7ecdfe04b30d31;p=thirdparty%2Fsnort3.git fixed flow warnings --- diff --git a/src/flow/flow_control.cc b/src/flow/flow_control.cc index 029b7d6fa..9aa1a507d 100644 --- a/src/flow/flow_control.cc +++ b/src/flow/flow_control.cc @@ -296,10 +296,10 @@ void FlowControl::timeout_flows(uint32_t flowCount, time_t cur_time) Active::resume(); } -void FlowControl::preemptive_cleanup(const Packet* p) +void FlowControl::preemptive_cleanup() { DebugFormat(DEBUG_FLOW, "doing preemptive cleanup for packet of type %d", - static_cast(p->type())); + last_pkt_type); // FIXIT-L J is there a possibility of this looping forever? while ( memory::MemoryCap::over_threshold() ) @@ -465,8 +465,7 @@ unsigned FlowControl::process(Flow* flow, Packet* p) p->disable_inspect = flow->is_inspection_disabled(); last_pkt_type = p->type(); - - preemptive_cleanup(p); + preemptive_cleanup(); if ( flow->flow_state ) set_policies(snort_conf, flow->policy_id); diff --git a/src/flow/flow_control.h b/src/flow/flow_control.h index c8e4366d3..70600743a 100644 --- a/src/flow/flow_control.h +++ b/src/flow/flow_control.h @@ -103,7 +103,7 @@ private: void set_key(FlowKey*, Packet*); unsigned process(Flow*, Packet*); - void preemptive_cleanup(const Packet*); + void preemptive_cleanup(); private: FlowCache* ip_cache;