summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-02 22:15:26 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-02 22:15:26 (GMT)
commit0e04d7eff0b745edc8a3fea78dea91408f99dccd (patch)
tree8141d21638e5e16dee9a4afea9345a00cc1b0073 /src/plugins
parent9c726c2f2791f82de52f54ffc1f580630d10c61d (diff)
parentb600ce8b388ad20b64c44198b582e000b4289c00 (diff)
downloadQt-0e04d7eff0b745edc8a3fea78dea91408f99dccd.zip
Qt-0e04d7eff0b745edc8a3fea78dea91408f99dccd.tar.gz
Qt-0e04d7eff0b745edc8a3fea78dea91408f99dccd.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Ukrainian translation updated Fix remote crash in delivering D-Bus calls with too few arguments Ensure that OpenGL contexts are attached to an NSView before first paint Reduce memory consumption of QtScript/JSC on Symbian Doc: Changed the default URL to avoid a Flash plugin crash on x86-64. Doc: Updated Supported Platforms page. Finished New binary of configure.exe with -mp/-no-mp option Turn Makefile.win32 into batch-mode, enable /MP and PCH Add option to enable -MP compile option for MSVC Rewrite ucstrcmp in terms of ucstrncmp Reorganise qelapsedtimer_unix.cpp for better inlining performance. Update the cpuid code to be better Revert "Restore default if to system default on session close."
Diffstat (limited to 'src/plugins')
-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