summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-07-26 00:33:51 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-07-27 02:02:25 (GMT)
commita0ae434a452deea022e3b7117e946e95542aa884 (patch)
treed0dbffe8e4c141b608c2c51896bb5b64e5500156
parenta847edefd9e2efd70e63935965624354406f932d (diff)
downloadQt-a0ae434a452deea022e3b7117e946e95542aa884.zip
Qt-a0ae434a452deea022e3b7117e946e95542aa884.tar.gz
Qt-a0ae434a452deea022e3b7117e946e95542aa884.tar.bz2
Cherry pick fix for MOBILITY-1144 from Qt Mobility.
426ff79e49d4abb659167541bb67846443b9707e
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index f89ed0a..99737d7 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -1044,6 +1044,11 @@ void QNetworkSessionPrivateImpl::RunL()
TInt error = KErrNone;
QNetworkConfiguration newActiveConfig = activeConfiguration();
if (!newActiveConfig.isValid()) {
+ // RConnection startup was successfull but no configuration
+ // was found. That indicates that user has chosen to create a
+ // new WLAN configuration (from scan results), but that new
+ // configuration does not have access to Internet (Internet
+ // Connectivity Test, ICT, failed).
error = KErrGeneral;
} else {
// Use name of the IAP to open global 'Open C' RConnection
@@ -1053,16 +1058,24 @@ void QNetworkSessionPrivateImpl::RunL()
strcpy(ifr.ifr_name, nameAsByteArray.constData());
error = setdefaultif(&ifr);
}
-
if (error != KErrNone) {
isOpen = false;
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- Cancel();
if (ipConnectionNotifier) {
ipConnectionNotifier->StopNotifications();
}
+ if (!newActiveConfig.isValid()) {
+ // No valid configuration, bail out.
+ // Status updates from QNCM won't be received correctly
+ // because there is no configuration to associate them with so transit here.
+ iConnection.Close();
+ newState(QNetworkSession::Closing);
+ newState(QNetworkSession::Disconnected);
+ } else {
+ Cancel();
+ }
QT_TRYCATCH_LEAVING(syncStateWithInterface());
return;
}