From 919e282ff62171654dd60875fe1c058f36a14584 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 21 Mar 2011 18:57:16 +0000 Subject: 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 --- src/network/kernel/qhostinfo_symbian.cpp | 4 +--- 1 file changed, 1 insertion(+), 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; } -- cgit v0.12