summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2012-01-13 13:20:46 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-01-13 14:07:02 (GMT)
commitd46446044fd7c5aca86c63cacad2706718d457c5 (patch)
tree1cebbfd09650dfc60ba5282c7013fa6d85cb97dd /src/plugins/bearer
parentafdac0d065d945cc0e9cf09f3150d77760694653 (diff)
downloadQt-d46446044fd7c5aca86c63cacad2706718d457c5.zip
Qt-d46446044fd7c5aca86c63cacad2706718d457c5.tar.gz
Qt-d46446044fd7c5aca86c63cacad2706718d457c5.tar.bz2
symbian - fix lockup when a network session is opened from its error
When QNetworkAccessManager::get is called from the slot connected to QNetworkAccessManager::finished, this is equivalent to calling QNetworkSession::open from the slot connected to QNetworkSession::error. Close handles before emitting the error signal, instead of afterwards. Otherwise the session start would be silently cancelled in the above situation. Task-number: ou1cimx1#960395 Change-Id: I48cb376722e0169721fd33614a0b9280c17bdd62 Reviewed-by: Murray Read <ext-murray.2.read@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Diffstat (limited to 'src/plugins/bearer')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 2145145..9f6d08d 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -450,8 +450,8 @@ void QNetworkSessionPrivateImpl::open()
isOpen = false;
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
- emit QNetworkSessionPrivate::error(iError);
closeHandles();
+ emit QNetworkSessionPrivate::error(iError);
syncStateWithInterface();
}
}
@@ -723,8 +723,8 @@ void QNetworkSessionPrivateImpl::Error(TInt aError)
activeConfig = QNetworkConfiguration();
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::RoamingError;
- emit QNetworkSessionPrivate::error(iError);
closeHandles();
+ emit QNetworkSessionPrivate::error(iError);
QT_TRY {
syncStateWithInterface();
// In some cases IAP is still in Connected state when
@@ -1076,8 +1076,8 @@ void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
isOpen = false;
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
- QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
closeHandles();
+ QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
if (!newActiveConfig.isValid()) {
// No valid configuration, bail out.
// Status updates from QNCM won't be received correctly
@@ -1125,8 +1125,8 @@ void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
activeConfig = QNetworkConfiguration();
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::InvalidConfigurationError;
- QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
closeHandles();
+ QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
QT_TRYCATCH_LEAVING(syncStateWithInterface());
break;
case KErrCancel: // Connection attempt cancelled
@@ -1144,8 +1144,8 @@ void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
} else {
iError = QNetworkSession::UnknownSessionError;
}
- QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
closeHandles();
+ QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
QT_TRYCATCH_LEAVING(syncStateWithInterface());
break;
}
@@ -1226,8 +1226,8 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
activeConfig = QNetworkConfiguration();
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::SessionAbortedError;
- emit QNetworkSessionPrivate::error(iError);
closeHandles();
+ emit QNetworkSessionPrivate::error(iError);
// Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
iHandleStateNotificationsFromManager = true;
emitSessionClosed = true; // Emit SessionClosed after state change has been reported