QHostInfo: fix a race condition under CE
Merge-request: 1339 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Change-Id: Id1f977ad8f746ac848c355880cac688e256721d8 Reviewed-on: http://codereview.qt-project.org/6145 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>bb10
parent
cb2e618127
commit
bb1f50b7b1
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue