summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-12-05 06:06:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-12-05 06:06:46 (GMT)
commita1640ce50e9350df64fca984a3454a72e31f0ef7 (patch)
tree80c369d115452d794480734bde2150934bf07602 /src/plugins
parent91814c0a9d32b5a306037a73c067c02d3f5be4ff (diff)
parent235e4fb7316cfe65605c3a035cf3a4f0d167335c (diff)
downloadQt-a1640ce50e9350df64fca984a3454a72e31f0ef7.zip
Qt-a1640ce50e9350df64fca984a3454a72e31f0ef7.tar.gz
Qt-a1640ce50e9350df64fca984a3454a72e31f0ef7.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: Correct client rect calculation for MCL Symbian: Fix CBA display on application with multiple windows Fix def files doc - document symbian behaviour of QFile::link Symbian - prefer sessions started by this process to choose proxy Freezing Def files in Qt Lightmaps demo Symbian fix CBA comes on top of option menu Fix memory leaks in OpenVG and OpenGL resource pools Fix sqlite driver memory eating due to close failure
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp57
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h3
2 files changed, 48 insertions, 12 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index f5f71cf..58ce8fe 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -64,7 +64,7 @@ QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
ipConnectionNotifier(0), ipConnectionStarter(0),
iHandleStateNotificationsFromManager(false), iFirstSync(true), iStoppedByUser(false),
iClosedByUser(false), iError(QNetworkSession::UnknownSessionError), iALREnabled(0),
- iConnectInBackground(false), isOpening(false)
+ iConnectInBackground(false), iCurrentIap(0), isOpening(false)
{
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -77,6 +77,7 @@ QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
void QNetworkSessionPrivateImpl::closeHandles()
{
QMutexLocker lock(&mutex);
+ updateCurrentIap(0);
// Cancel Connection Progress Notifications first.
// Note: ConnectionNotifier must be destroyed before RConnection::Close()
// => deleting ipConnectionNotifier results RConnection::CancelProgressNotification()
@@ -637,6 +638,8 @@ void QNetworkSessionPrivateImpl::accept()
QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
+ updateCurrentIap(iNewRoamingIap);
+
newState(QNetworkSession::Connected, iNewRoamingIap);
}
#endif
@@ -867,19 +870,31 @@ quint64 QNetworkSessionPrivateImpl::activeTime() const
return startTime.secsTo(QDateTime::currentDateTime());
}
-QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 iapId) const
+bool QNetworkSessionPrivateImpl::activeIapId(TUint32& iapId) const
{
- if (iapId == 0) {
- _LIT(KSetting, "IAP\\Id");
- iConnection.GetIntSetting(KSetting, iapId);
+ if (!iConnection.SubSessionHandle())
+ return false;
+ _LIT(KSetting, "IAP\\Id");
+ TInt err = iConnection.GetIntSetting(KSetting, iapId);
+ if (err != KErrNone)
+ return false;
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- // Check if this is an Easy WLAN configuration. On Symbian^3 RConnection may report
- // the used configuration as 'EasyWLAN' IAP ID if someone has just opened the configuration
- // from WLAN Scan dialog, _and_ that connection is still up. We need to find the
- // real matching configuration. Function alters the Easy WLAN ID to real IAP ID (only if
- // easy WLAN):
- easyWlanTrueIapId(iapId);
+ // Check if this is an Easy WLAN configuration. On Symbian^3 RConnection may report
+ // the used configuration as 'EasyWLAN' IAP ID if someone has just opened the configuration
+ // from WLAN Scan dialog, _and_ that connection is still up. We need to find the
+ // real matching configuration. Function alters the Easy WLAN ID to real IAP ID (only if
+ // easy WLAN):
+ easyWlanTrueIapId(iapId);
#endif
+ return true;
+}
+
+QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 iapId) const
+{
+ if (iapId == 0) {
+ bool ok = activeIapId(iapId);
+ if (!ok)
+ return QNetworkConfiguration();
}
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -1015,6 +1030,20 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
return publicConfig;
}
+void QNetworkSessionPrivateImpl::updateCurrentIap(TUint32 iapId)
+{
+ if (iCurrentIap == iapId)
+ return;
+
+ if (iCurrentIap != 0)
+ QSymbianSocketManager::instance().removeActiveConnection(iCurrentIap);
+
+ iCurrentIap = iapId;
+
+ if (iCurrentIap != 0)
+ QSymbianSocketManager::instance().addActiveConnection(iCurrentIap);
+}
+
void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
{
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
@@ -1028,7 +1057,10 @@ void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
case KErrNone: // Connection created successfully
{
TInt error = KErrNone;
- QNetworkConfiguration newActiveConfig = activeConfiguration();
+ TUint32 iapId;
+ QNetworkConfiguration newActiveConfig;
+ if (activeIapId(iapId))
+ newActiveConfig = activeConfiguration(iapId);
if (!newActiveConfig.isValid()) {
// RConnection startup was successful but no configuration
// was found. That indicates that user has chosen to create a
@@ -1038,6 +1070,7 @@ void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
error = KErrGeneral;
} else {
QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
+ updateCurrentIap(iapId);
}
if (error != KErrNone) {
isOpen = false;
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 17a051e..9e02e5b 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -143,6 +143,8 @@ private:
void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0);
QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const;
QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const;
+ bool activeIapId(TUint32 &iapId) const;
+ void updateCurrentIap(TUint32 iapId);
#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface interface(TUint iapId) const;
#endif
@@ -186,6 +188,7 @@ private: // data
TUint32 iOldRoamingIap;
TUint32 iNewRoamingIap;
+ TUint32 iCurrentIap;
bool isOpening;