[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kio/kio
From:       Andreas Hartmetz <ahartmetz () gmail ! com>
Date:       2010-01-18 21:11:18
Message-ID: 1263849078.329425.4632.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1076771 by ahartmetz:

This hopefully fixes an assert failure when nothing is wrong; bug reported by teve on IRC.

 M  +4 -5      scheduler.cpp  


--- trunk/KDE/kdelibs/kio/kio/scheduler.cpp #1076770:1076771
@@ -164,8 +164,6 @@
 }
 
 
-
-
 int HostQueue::lowestSerial() const
 {
     QMap<int, SimpleJob*>::ConstIterator first = m_queuedJobs.constBegin();
@@ -479,9 +477,10 @@
             // we have dequeued the not yet running job with the lowest serial
             Q_ASSERT(!jobPriv->m_slave);
             Q_ASSERT(prevRunningJobs == hq.runningJobsCount());
-            const bool removed = m_queuesBySerial.remove(prevLowestSerial);
-            Q_UNUSED(removed);
-            Q_ASSERT(removed);
+            if (m_queuesBySerial.remove(prevLowestSerial) == 0) {
+                // make sure that the queue was not scheduled for a good reason
+                Q_ASSERT(hq.runningJobsCount() == m_maxConnectionsPerHost);
+            }
         } else {
             if (prevRunningJobs != hq.runningJobsCount()) {
                 // we have dequeued a previously running job
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic