summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-10-06 10:09:14 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2011-10-06 10:09:14 (GMT)
commitd1fa89e1cce4dcc6bf15fc59196be6764fda51d1 (patch)
tree7e05a8eb3e96f131a750f9bf03ad7298906a5c7b /src/network/kernel
parentf2526089d4b84b0b2c8a511ff2c22a22a6f2ee73 (diff)
downloadQt-d1fa89e1cce4dcc6bf15fc59196be6764fda51d1.zip
Qt-d1fa89e1cce4dcc6bf15fc59196be6764fda51d1.tar.gz
Qt-d1fa89e1cce4dcc6bf15fc59196be6764fda51d1.tar.bz2
QHostInfo: fix a race condition under CE
Merge-request: 1339 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qhostinfo_win.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp
index 6fc5b7b..1052863 100644
--- a/src/network/kernel/qhostinfo_win.cpp
+++ b/src/network/kernel/qhostinfo_win.cpp
@@ -97,14 +97,15 @@ static void resolveLibrary()
#if defined(Q_OS_WINCE)
#include <qmutex.h>
-QMutex qPrivCEMutex;
+Q_GLOBAL_STATIC(QMutex, qPrivCEMutex)
#endif
QHostInfo QHostInfoAgent::fromName(const QString &hostName)
{
#if defined(Q_OS_WINCE)
- QMutexLocker locker(&qPrivCEMutex);
+ QMutexLocker locker(qPrivCEMutex());
#endif
+
QWindowsSockInit winSock;
// Load res_init on demand.