summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-05-13 00:55:06 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-05-14 03:06:10 (GMT)
commit75c4dea93ad415dd9c79cb57ec5598e38789b28d (patch)
treeb4cf7901e9d69879335808242fc9c8e6c8533902 /src
parent608d39c9ffee622114d9bc178d5e8ad3d1eadfb5 (diff)
downloadQt-75c4dea93ad415dd9c79cb57ec5598e38789b28d.zip
Qt-75c4dea93ad415dd9c79cb57ec5598e38789b28d.tar.gz
Qt-75c4dea93ad415dd9c79cb57ec5598e38789b28d.tar.bz2
Cherry pick fix for MOBILITY-932 from Qt Mobility.
807e9868152bb06d37895a5e3d1a3e49908a6036
Diffstat (limited to 'src')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index f09c73a..ce2203d 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -523,13 +523,6 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
// when reporting.
iClosedByUser = true;
- SymbianNetworkConfigurationPrivate *symbianConfig =
- toSymbianConfig(privateConfiguration(activeConfig));
-
- symbianConfig->mutex.lock();
- TUint activeIap = symbianConfig->numericId;
- symbianConfig->mutex.unlock();
-
isOpen = false;
activeConfig = QNetworkConfiguration();
serviceConfig = QNetworkConfiguration();
@@ -554,19 +547,12 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
// Close global 'Open C' RConnection
setdefaultif(0);
-#ifdef Q_CC_NOKIAX86
- if ((allowSignals && iapClientCount(activeIap) <= 0) ||
-#else
- if ((allowSignals && iapClientCount(activeIap) <= 1) ||
-#endif
- (publicConfig.type() == QNetworkConfiguration::UserChoice)) {
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
newState(QNetworkSession::Closing);
+ newState(QNetworkSession::Disconnected);
}
if (allowSignals) {
- if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
- newState(QNetworkSession::Disconnected);
- }
emit closed();
}
}
@@ -599,7 +585,7 @@ void QNetworkSessionPrivateImpl::stop()
}
TUint numSubConnections; // Not used but needed by GetConnectionInfo i/f
TUint connectionId;
- for (TInt i = 1; i <= count; ++i) {
+ for (TUint i = 1; i <= count; ++i) {
// Get (connection monitor's assigned) connection ID
TInt ret = iConnectionMonitor.GetConnectionInfo(i, connectionId, numSubConnections);
if (ret == KErrNone) {
@@ -1236,7 +1222,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
QMutexLocker configLocker(&symbianConfig->mutex);
if (symbianConfig->numericId == accessPointId) {
- if (newState == QNetworkSession::Connected) {
+ if (newState != QNetworkSession::Disconnected) {
state = newState;
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed D to: " << state;
@@ -1256,6 +1242,16 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
#endif
emit stateChanged(state);
retVal = true;
+ } else if (config.state() == QNetworkConfiguration::Active) {
+ // Connection to used IAP was closed, but there is another
+ // IAP that's active in used SNAP
+ // => Change state back to Connected
+ state = QNetworkSession::Connected;
+ emit stateChanged(state);
+ retVal = true;
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed F to: " << state;
+#endif
}
}
}