diff options
author | Peter Hartmann <phartmann@rim.com> | 2013-01-25 08:38:47 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-03 09:29:21 (GMT) |
commit | 5593ff874812e5c285af609faad834f448a2dae7 (patch) | |
tree | b2b10bc4efcd0eea3fda84aaf7e54631506a2f7b /src/network/bearer | |
parent | a7d02de7bc2efecd00033508d9f54190b0365256 (diff) | |
download | Qt-5593ff874812e5c285af609faad834f448a2dae7.zip Qt-5593ff874812e5c285af609faad834f448a2dae7.tar.gz Qt-5593ff874812e5c285af609faad834f448a2dae7.tar.bz2 |
BlackBerry bearer plugin: check whether device is online several times
This is supposed to workaround a race condition in the underlying
netstatus API: Sometimes we get an event that the Wifi interface
changed, but it is not up, e.g. no gateway (yet). In that case we need
to check back (currently: 300 ms) whether the interface has come
up or not.
This commit can be reverted again once the race condition in the
netstatus API has been resolved.
Task-number: QTBUG-29421
(cherry picked from commit 3dc47622a469ded1c99397fdedc2053b73d57189)
Change-Id: I252c39411340fe3f6af8440a8f21482ca9b6e62d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/network/bearer')
-rw-r--r-- | src/network/bearer/qnetworkconfiguration_p.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h index cdeec36..b69ce87 100644 --- a/src/network/bearer/qnetworkconfiguration_p.h +++ b/src/network/bearer/qnetworkconfiguration_p.h @@ -59,6 +59,10 @@ #include <QtCore/qmutex.h> #include <QtCore/qmap.h> +#ifdef Q_OS_BLACKBERRY +#include <bps/netstatus.h> +#endif + QT_BEGIN_NAMESPACE typedef QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> QNetworkConfigurationPrivatePointer; @@ -70,6 +74,9 @@ public: type(QNetworkConfiguration::Invalid), purpose(QNetworkConfiguration::UnknownPurpose), bearerType(QNetworkConfiguration::BearerUnknown), +#ifdef Q_OS_BLACKBERRY + oldIpStatus(NETSTATUS_IP_STATUS_ERROR_UNKNOWN), +#endif isValid(false), roamingSupported(false) {} virtual ~QNetworkConfigurationPrivate() @@ -95,6 +102,10 @@ public: QNetworkConfiguration::Purpose purpose; QNetworkConfiguration::BearerType bearerType; +#ifdef Q_OS_BLACKBERRY + netstatus_ip_status_t oldIpStatus; +#endif + bool isValid; bool roamingSupported; |