Skip to content
Snippets Groups Projects
Commit 6aa9e6b0 authored by Michael Davis's avatar Michael Davis
Browse files

[lpa-stream] operator++ should stop at end of job queue

...before moving to first item of next job queue queue, which requires
one additional call to operator++
parent 9974cfb7
No related branches found
No related tags found
No related merge requests found
......@@ -37,14 +37,13 @@ public:
/*!
* Increment iterator
*
* If we try to increment an empty queue or increment past the end of a queue, move to the first
* item of the next queue.
* Increments to the end of the current job queue. Incrementing again moves to the next queue,
* except when we are limited to one tapepool/vid.
*/
void operator++() {
if(m_jobQueueIt != m_jobQueue.end()) {
++m_jobQueueIt;
}
if(m_jobQueueIt == m_jobQueue.end() && !m_onlyThisQueueId) {
} else if(!m_onlyThisQueueId) {
++m_jobQueuesQueueIt;
if(m_jobQueuesQueueIt != m_jobQueuesQueue.end()) {
getQueueJobs();
......
......@@ -101,7 +101,7 @@ public:
} else {
// Summary by tapepool or vid
for(bool is_buffer_full = false; !(is_buffer_full || m_queueItor.end()); )
for(bool is_buffer_full = false; !m_queueItor.end() && !is_buffer_full; ++m_queueItor)
{
uint64_t total_files = 0;
uint64_t total_size = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment