diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-07-26 00:33:51 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-07-29 03:37:49 (GMT) |
commit | 21629ac069349f29ec9e329f96934dbdd3a84745 (patch) | |
tree | 4b90f66c8a4731a8226b3b7b6f4927dd1039fc77 /src/plugins/bearer | |
parent | 7dc58c499fad151977f15d37f3d03ffab2883e76 (diff) | |
download | Qt-21629ac069349f29ec9e329f96934dbdd3a84745.zip Qt-21629ac069349f29ec9e329f96934dbdd3a84745.tar.gz Qt-21629ac069349f29ec9e329f96934dbdd3a84745.tar.bz2 |
Cherry pick fix for MOBILITY-1144 from Qt Mobility.
426ff79e49d4abb659167541bb67846443b9707e
(cherry picked from commit a0ae434a452deea022e3b7117e946e95542aa884)
Diffstat (limited to 'src/plugins/bearer')
-rw-r--r-- | src/plugins/bearer/symbian/qnetworksession_impl.cpp | 17 |
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; } |