From 40a99fc24e65035ff0668fe16b3bdb9891888696 Mon Sep 17 00:00:00 2001 From: Ido Barnea Date: Sun, 27 Mar 2016 14:29:37 +0300 Subject: properly ignore streams without flow stat enabled on stream deletion in flow_stat --- src/flow_stat.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/flow_stat.cpp') diff --git a/src/flow_stat.cpp b/src/flow_stat.cpp index 43bde08b..9de90769 100644 --- a/src/flow_stat.cpp +++ b/src/flow_stat.cpp @@ -493,13 +493,13 @@ int CFlowStatRuleMgr::del_stream(const TrexStream * stream) { std::cout << __METHOD_NAME__ << " user id:" << stream->m_rx_check.m_pg_id << std::endl; #endif - if (! m_api) - throw TrexException("Called del_stream, but no stream was added"); - if (! stream->m_rx_check.m_enabled) { return 0; } + if (! m_api) + throw TrexException("Called del_stream, but no stream was added"); + if (m_user_id_map.is_started(stream->m_rx_check.m_pg_id)) { std::cerr << "Error: Trying to delete flow statistics stream " << stream->m_rx_check.m_pg_id << " which is not stopped." << std::endl; -- cgit 1.2.3-korg