summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-07-27 02:11:12 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-07-27 02:11:12 (GMT)
commit7b16419e61ea0ec2aa981b9600581f517addbb72 (patch)
tree0777b95ef9f046a2921625813b7ed1cffd5ae2d4 /src
parent5929062996c9d0d90f19198064953a0086be7741 (diff)
parentc16f0a839743af36b36aea9c35f0d5ddfda3d6ac (diff)
downloadQt-7b16419e61ea0ec2aa981b9600581f517addbb72.zip
Qt-7b16419e61ea0ec2aa981b9600581f517addbb72.tar.gz
Qt-7b16419e61ea0ec2aa981b9600581f517addbb72.tar.bz2
Merge commit 'c16f0a839743af36b36aea9c35f0d5ddfda3d6ac' into oslo-staging-1
Diffstat (limited to 'src')
-rw-r--r--src/network/bearer/qnetworksession.cpp12
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp21
2 files changed, 26 insertions, 7 deletions
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 1ed6cbb..65de539 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -629,8 +629,10 @@ void QNetworkSession::reject()
If the session is based on a service network configuration the number of
sent bytes across all active member configurations are returned.
- This function may not always be supported on all platforms and returns
- 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+ This function may not always be supported on all platforms and returns 0.
+ The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+
+ \note On some platforms this function may run the main event loop.
*/
quint64 QNetworkSession::bytesWritten() const
{
@@ -646,8 +648,10 @@ quint64 QNetworkSession::bytesWritten() const
If the session is based on a service network configuration the number of
sent bytes across all active member configurations are returned.
- This function may not always be supported on all platforms and returns
- 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+ This function may not always be supported on all platforms and returns 0.
+ The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+
+ \note On some platforms this function may run the main event loop.
*/
quint64 QNetworkSession::bytesReceived() const
{
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index f89ed0a..d6b4975 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;
}
@@ -1117,7 +1130,9 @@ void QNetworkSessionPrivateImpl::RunL()
isOpening = false;
activeConfig = QNetworkConfiguration();
serviceConfig = QNetworkConfiguration();
- if (publicConfig.state() == QNetworkConfiguration::Undefined ||
+ if (statusCode == KErrCancel) {
+ iError = QNetworkSession::SessionAbortedError;
+ } else if (publicConfig.state() == QNetworkConfiguration::Undefined ||
publicConfig.state() == QNetworkConfiguration::Defined) {
iError = QNetworkSession::InvalidConfigurationError;
} else {