diff options
author | imarom <imarom@cisco.com> | 2015-11-09 10:40:11 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2015-11-09 10:56:11 +0200 |
commit | 67bcc46be09049d2ca65c0af2aa6a2fe0821eb04 (patch) | |
tree | f6fde81c1a6983a6cb28783871290ee4970b23b7 /src/bp_sim.cpp | |
parent | c75eb0b81a70ac39a5535553ad902b3a11385d48 (diff) |
DPDK target is now built with -Wall -Werror
(with few expections)
on both Fedora 18 and Ubunutu
Diffstat (limited to 'src/bp_sim.cpp')
-rwxr-xr-x | src/bp_sim.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp index 479f0982..0c0cbb75 100755 --- a/src/bp_sim.cpp +++ b/src/bp_sim.cpp @@ -3420,7 +3420,7 @@ int CNodeGenerator::flush_file(dsec_t max_time, add_node(exit_node); } - while (!m_p_queue.empty()) { + while (true) { node = m_p_queue.top(); n_time = node->m_time + offset; @@ -3600,13 +3600,17 @@ CNodeGenerator::handle_slow_messages(uint8_t type, thread->check_msgs(); /* check messages */ m_v_if->flush_tx_queue(); /* flush pkt each timeout */ - if (always == false) { + /* on always (clean queue path) and queue empty - exit */ + if ( always && (m_p_queue.empty()) ) { + thread->free_node(node); + exit_scheduler = true; + } else { + /* schedule for next maintenace */ node->m_time += SYNC_TIME_OUT; m_p_queue.push(node); - }else{ - thread->free_node(node); } + } else if ( type == CGenNode::EXIT_SCHED ) { m_p_queue.pop(); thread->free_node(node); |