diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-03-21 18:57:16 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-03-22 10:13:42 (GMT) |
commit | 919e282ff62171654dd60875fe1c058f36a14584 (patch) | |
tree | bcdd78a5bb0e49a731510ff87fbe4a2052c92d04 /src/network | |
parent | c9edb126e6f01e54dfbb1e952b253b2490d26e88 (diff) | |
download | Qt-919e282ff62171654dd60875fe1c058f36a14584.zip Qt-919e282ff62171654dd60875fe1c058f36a14584.tar.gz Qt-919e282ff62171654dd60875fe1c058f36a14584.tar.bz2 |
Fix a deadlock in symbian QHostInfo when aborting
DoCancel was calling lookupFinished, which tries to acquire a mutex again
that was already acquired in abortLookup (causing a deadlock).
This call is un-necessary, as Cancel was only called from the destructor
and from abortLookup - in neither case is this wanted.
The run and RunError functions explicitly call lookupFinished.
This fixes hang in autotests when attempting to lookup a bad host name.
Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/kernel/qhostinfo_symbian.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/network/kernel/qhostinfo_symbian.cpp b/src/network/kernel/qhostinfo_symbian.cpp index ca76b12..c969748 100644 --- a/src/network/kernel/qhostinfo_symbian.cpp +++ b/src/network/kernel/qhostinfo_symbian.cpp @@ -299,8 +299,6 @@ void QSymbianHostResolver::requestHostLookup() void QSymbianHostResolver::DoCancel() { - QSymbianHostInfoLookupManger *manager = QSymbianHostInfoLookupManger::globalInstance(); - manager->lookupFinished(this); iHostResolver.Cancel(); } @@ -512,7 +510,7 @@ void QSymbianHostInfoLookupManger::abortLookup(int id) if (id == iCurrentLookups[i]->id()) { QSymbianHostResolver* r = iCurrentLookups[i]; iCurrentLookups.Remove(i); - r->Cancel(); + delete r; //cancels via destructor runNextLookup(); return; } |