diff options
Diffstat (limited to 'src/plugins/bearer/generic/qgenericengine.cpp')
-rw-r--r-- | src/plugins/bearer/generic/qgenericengine.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp index dba2c08..a95b14b 100644 --- a/src/plugins/bearer/generic/qgenericengine.cpp +++ b/src/plugins/bearer/generic/qgenericengine.cpp @@ -154,11 +154,15 @@ QGenericEngine::~QGenericEngine() QString QGenericEngine::getInterfaceFromId(const QString &id) { + QMutexLocker locker(&mutex); + return configurationInterface.value(id); } bool QGenericEngine::hasIdentifier(const QString &id) { + QMutexLocker locker(&mutex); + return configurationInterface.contains(id); } @@ -174,12 +178,16 @@ void QGenericEngine::disconnectFromId(const QString &id) void QGenericEngine::requestUpdate() { + QMutexLocker locker(&mutex); + pollTimer.stop(); QTimer::singleShot(0, this, SLOT(doRequestUpdate())); } void QGenericEngine::doRequestUpdate() { + QMutexLocker locker(&mutex); + // Immediately after connecting with a wireless access point // QNetworkInterface::allInterfaces() will sometimes return an empty list. Calling it again a // second time results in a non-empty list. If we loose interfaces we will end up removing @@ -282,6 +290,8 @@ void QGenericEngine::doRequestUpdate() QNetworkSession::State QGenericEngine::sessionStateForId(const QString &id) { + QMutexLocker locker(&mutex); + QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); if (!ptr) |