summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-09-02 03:42:39 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-09-02 03:42:39 (GMT)
commit23393f9650624bcc82942ee69161b6b916fa801e (patch)
tree8da2dbd2946862c8c8f32d640cd063983e299c1e /src/plugins/bearer
parenta0d1afbfd886a977e8f21371000f96bbf93ad568 (diff)
downloadQt-23393f9650624bcc82942ee69161b6b916fa801e.zip
Qt-23393f9650624bcc82942ee69161b6b916fa801e.tar.gz
Qt-23393f9650624bcc82942ee69161b6b916fa801e.tar.bz2
Revert "Restore default if to system default on session close."
This reverts commit bce4c42a3d0c7d24009230e09aa58db60db39d40. This change did not have the desired effect on Symbian versions prior to Symbian^3. Conflicts: src/plugins/bearer/symbian/qnetworksession_impl.cpp
Diffstat (limited to 'src/plugins/bearer')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp42
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h1
2 files changed, 14 insertions, 29 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 19f13c2..2091898 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -111,13 +111,15 @@ QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
Cancel();
iSocketServ.Close();
- // Restore default interface to system default
- restoreDefaultIf();
+ // Close global 'Open C' RConnection
+ // Clears also possible unsetdefaultif() flags.
+ setdefaultif(0);
iConnectionMonitor.Close();
iOpenCLibrary.Close();
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
- qDebug() << "QNS this : " << QString::number((uint)this) << " - destroyed (and restoreDefaultIf())";
+ qDebug() << "QNS this : " << QString::number((uint)this)
+ << " - destroyed (and setdefaultif(0))";
#endif
}
@@ -533,8 +535,15 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
Cancel(); // closes iConnection
iSocketServ.Close();
- // Restore default interface to system default
- restoreDefaultIf();
+ // Close global 'Open C' RConnection. If OpenC supports,
+ // close the defaultif for good to avoid difficult timing
+ // and bouncing issues of network going immediately back up
+ // because of e.g. select() thread etc.
+ if (iDynamicUnSetdefaultif) {
+ iDynamicUnSetdefaultif();
+ } else {
+ setdefaultif(0);
+ }
// If UserChoice, go down immediately. If some other configuration,
// go down immediately if there is no reports expected from the platform;
@@ -1459,29 +1468,6 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne
}
}
-void QNetworkSessionPrivateImpl::restoreDefaultIf()
-{
- QNetworkConfigurationPrivatePointer config = engine->defaultConfiguration();
-
- QMutexLocker locker(&config->mutex);
-
- ifreq ifr;
- memset(&ifr, 0, sizeof(ifreq));
-
- switch (config->type) {
- case QNetworkConfiguration::InternetAccessPoint:
- strcpy(ifr.ifr_name, config->name.toUtf8().constData());
- break;
- case QNetworkConfiguration::ServiceNetwork:
- ifr.ifr_ifru.snap_id = toSymbianConfig(config)->numericId;
- break;
- default:
- ;
- };
-
- setdefaultif(&ifr);
-}
-
#if defined(SNAP_FUNCTIONALITY_AVAILABLE)
bool QNetworkSessionPrivateImpl::easyWlanTrueIapId(TUint32 &trueIapId) const
{
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 51f2e70..8e3e997 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -141,7 +141,6 @@ private:
void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0);
QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const;
QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const;
- void restoreDefaultIf();
#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface interface(TUint iapId) const;
#endif