diff options
author | Xizhi Zhu <xizhi.zhu@nokia.com> | 2011-05-24 10:43:45 (GMT) |
---|---|---|
committer | Xizhi Zhu <xizhi.zhu@nokia.com> | 2011-05-24 10:50:21 (GMT) |
commit | b001e886b35d06ca2551709280f0541cdc75c34a (patch) | |
tree | 378344fb5b949b4eb934ced40a23f98a5f0d75f1 /src | |
parent | 841cd1500d153f5141f4c8a1e039f235c39d01f3 (diff) | |
download | Qt-b001e886b35d06ca2551709280f0541cdc75c34a.zip Qt-b001e886b35d06ca2551709280f0541cdc75c34a.tar.gz Qt-b001e886b35d06ca2551709280f0541cdc75c34a.tar.bz2 |
Fix the state of default network configuration.
PMO Bug 257336 - Default configuration remains in QNetworkConfiguration::Active state even when device moves out of WLAN coverage
This fix sets the default network configuration (of type UserChoice) back to Discovered when the network session is disconnected.
Reviewed-by: Cristiano di Flora
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/bearer/icd/qnetworksession_impl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index f08d8bf..a99c0a7 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -183,6 +183,12 @@ void QNetworkSessionPrivateImpl::updateState(QNetworkSession::State newState) icdConfig->mutex.lock(); icdConfig->state = QNetworkConfiguration::Defined; icdConfig->mutex.unlock(); + + // Reset the state of the default configuration to Discovered + icdConfig = toIcdConfig(privateConfiguration(publicConfig)); + icdConfig->mutex.lock(); + icdConfig->state = QNetworkConfiguration::Discovered; + icdConfig->mutex.unlock(); } else { if (!activeConfig.isValid()) { // Active configuration (IAP) was removed from system |