diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-08-31 06:33:41 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-09-02 23:43:14 (GMT) |
commit | 6939815182b31ab865184e40991eb339ff21ba2d (patch) | |
tree | aff0ef14889491c883e02b04541f3c19da1aa37d /src | |
parent | 0e04d7eff0b745edc8a3fea78dea91408f99dccd (diff) | |
download | Qt-6939815182b31ab865184e40991eb339ff21ba2d.zip Qt-6939815182b31ab865184e40991eb339ff21ba2d.tar.gz Qt-6939815182b31ab865184e40991eb339ff21ba2d.tar.bz2 |
Fix potential KERN-EXEC 0 on Symbian.
SymbianEngine::updateConfigurationsL cannot be called from a
non-main thread as it uses Symbian resources not shared between
threads.
Task-number: QTBUG-13064
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/bearer/symbian/qnetworksession_impl.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 2091898..7f81397 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -968,11 +968,17 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia } } else { #ifdef SNAP_FUNCTIONALITY_AVAILABLE - // On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it triggers - // user choice type of activity (EasyWLAN). As a result, a new IAP may be created, and - // hence if was not found yet. Therefore update configurations and see if there is something new. + // On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it + // triggers user choice type of activity (EasyWLAN). As a result, a new IAP may be + // created, and hence if was not found yet. Therefore update configurations and see if + // there is something new. + // 1. Update knowledge from the databases. - engine->requestUpdate(); + if (thread() != engine->thread()) + QMetaObject::invokeMethod(engine, "requestUpdate", Qt::BlockingQueuedConnection); + else + engine->requestUpdate(); + // 2. Check if new configuration was created during connection creation QList<QString> knownConfigs = engine->accessPointConfigurationIdentifiers(); #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG @@ -1025,7 +1031,12 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia } else { // Check if new (WLAN) IAP was created in IAP/SNAP dialog // 1. Sync internal configurations array to commsdb first - engine->updateConfigurations(); + if (thread() != engine->thread()) { + QMetaObject::invokeMethod(engine, "requestUpdate", + Qt::BlockingQueuedConnection); + } else { + engine->requestUpdate(); + } // 2. Check if new configuration was created during connection creation QStringList knownConfigs = engine->accessPointConfigurationIdentifiers(); if (knownConfigs.count() > iKnownConfigsBeforeConnectionStart.count()) { |