summaryrefslogtreecommitdiffstats
path: root/src/bp_sim.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-17 15:27:46 +0200
committerimarom <imarom@cisco.com>2015-11-17 15:27:46 +0200
commitd9ed62e91c83039521b817779b4bc0197cc8151a (patch)
treeebdef86ed9e9b07b2982ff6bcfdcef2f42b86370 /src/bp_sim.cpp
parent07e6795a7497151e0920c82337cca6cfb5c3c3cd (diff)
parentaa9bf54e6f892168482ed647a0e67ab10b1cf34a (diff)
Merge branch 'master' of csi-sceasr-b45:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core
Conflicts: src/main_dpdk.cpp
Diffstat (limited to 'src/bp_sim.cpp')
-rwxr-xr-xsrc/bp_sim.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp
index 39d46d16..c456e9a3 100755
--- a/src/bp_sim.cpp
+++ b/src/bp_sim.cpp
@@ -3177,6 +3177,7 @@ bool CFlowGenListPerThread::Create(uint32_t thread_id,
uint32_t max_threads){
+ m_terminated_by_master=false;
m_flow_list =flow_list;
m_core_id= core_id;
m_tcp_dpc= 0;
@@ -3573,6 +3574,9 @@ int CNodeGenerator::flush_file(dsec_t max_time,
}
}
+ if ( thread->is_terminated_by_master() ) {
+ return (0);
+ }
if (!always) {
old_offset =offset;
@@ -4010,11 +4014,13 @@ void CFlowGenListPerThread::start_generate_stateful(std::string erf_file_name,
#endif
m_node_gen.flush_file(c_stop_sec,d_time_flow, false,this,old_offset);
+
+
#ifdef VALG
CALLGRIND_STOP_INSTRUMENTATION;
printf (" %llu \n",os_get_hr_tick_64()-_start_time);
#endif
- if ( !CGlobalInfo::m_options.preview.getNoCleanFlowClose() ){
+ if ( !CGlobalInfo::m_options.preview.getNoCleanFlowClose() && (is_terminated_by_master()==false) ){
/* clean close */
m_node_gen.flush_file(m_cur_time_sec, d_time_flow, true,this,old_offset);
}