diff options
author | 2016-03-27 14:29:37 +0300 | |
---|---|---|
committer | 2016-03-27 17:18:30 +0300 | |
commit | 40a99fc24e65035ff0668fe16b3bdb9891888696 (patch) | |
tree | 4fe2bb45adaf5920613788d10290a0b38e1910c1 /src | |
parent | 9b35a803e4bb42189ab75766af799341379bfc61 (diff) |
properly ignore streams without flow stat enabled on stream deletion in flow_stat
Diffstat (limited to 'src')
-rw-r--r-- | src/flow_stat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; |