[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkdelibs/KDE/4=2E6=5D_kio/kio=3A_Mostly_revert_the_c?=
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2011-04-18 1:27:55
Message-ID: 20110418012755.8528AA60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 5c65f468d016961e7e0bf877e56d475bc302f552 by Dawit Alemayehu.
Committed on 18/04/2011 at 03:23.
Pushed by adawit into branch 'KDE/4.6'.
Mostly revert the changes I made with commit d27c820581673040e80c46087b34b76e9fc9ed79.
I completely misunderstood the main concept behind put slave on hold. With the exception
of corner-case that can only be solved at the application level, putting slaves on hold
should work correctly once this partial revert is commited.
CCBUG:123121
CCBUG:148307
REVIEW:6271
M +7 -11 kio/kio/scheduler.cpp
http://commits.kde.org/kdelibs/5c65f468d016961e7e0bf877e56d475bc302f552
diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp
index 02c8e15..ff2cebd 100644
--- a/kio/kio/scheduler.cpp
+++ b/kio/kio/scheduler.cpp
@@ -1145,7 +1145,7 @@ Slave *SchedulerPrivate::heldSlaveForJob(SimpleJob *job)
slave = Slave::holdSlave(jobPriv->m_protocol, job->url());
}
- if (!slave && m_slaveOnHold) {
+ if (slave) {
// Make sure that the job wants to do a GET or a POST, and with no offset
const int cmd = jobPriv->m_command;
bool canJobReuse = cmd == CMD_GET;
@@ -1160,18 +1160,14 @@ Slave *SchedulerPrivate::heldSlaveForJob(SimpleJob *job)
}
}
- if (job->url() == m_urlOnHold) {
- if (canJobReuse) {
- kDebug(7006) << "HOLD: Reusing held slave for" << m_urlOnHold;
- slave = m_slaveOnHold;
- } else {
- kDebug(7006) << "HOLD: Discarding held slave (" << m_urlOnHold << ")";
- m_slaveOnHold->kill();
- }
- m_slaveOnHold = 0;
- m_urlOnHold.clear();
+ if (canJobReuse) {
+ kDebug(7006) << "HOLD: Reusing held slave (" << slave << ")";
+ } else {
+ kDebug(7006) << "HOLD: Discarding held slave (" << slave << ")";
+ slave->kill();
}
}
+
return slave;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic