path: root/src/plugins/bearer
diff options
authorPeter Hartmann <>2012-10-23 12:42:20 +0200
committerThe Qt Project <>2012-10-26 12:25:08 +0200
commitb9551c1b47277d58d86a82ce15501663257ed9a1 (patch)
treed46e7fc0abc232824bb2e6935f6630abfa552e94 /src/plugins/bearer
parentc89dc4fdd2770ba3ad52303a2f4cb0c6403a2ecd (diff)
Blackberry bearer plugin: Only Report working interfaces as active
Some interfaces might be connected but not working (e.g. no IP address, no gateway etc.) In practice, this prevents the USB interface (among others) from being reported as active and thus the QNetworkConfigurationManager as being reported as online. We only want Wifi and 3G etc. connections to be reported as online when they are up. Change-Id: I59fbe53bed8392d363a0191d589737f2304c853f Reviewed-by: Rafael Roquetto <> Reviewed-by: Andrey Leonov <> Reviewed-by: Sean Harmer <>
Diffstat (limited to 'src/plugins/bearer')
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/bearer/blackberry/qbbengine.cpp b/src/plugins/bearer/blackberry/qbbengine.cpp
index 79452aeae5..d64a8fe20f 100644
--- a/src/plugins/bearer/blackberry/qbbengine.cpp
+++ b/src/plugins/bearer/blackberry/qbbengine.cpp
@@ -316,15 +316,14 @@ void QBBEngine::updateConfiguration(const char *interface)
const QString id = idForName(name);
- const int numberOfIpAddresses = netstatus_interface_get_num_ip_addresses(details);
- const bool isConnected = netstatus_interface_is_connected(details);
const netstatus_interface_type_t type = netstatus_interface_get_type(details);
+ const netstatus_ip_status_t ipStatus = netstatus_interface_get_ip_status(details);
QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Defined;
- if (isConnected && (numberOfIpAddresses > 0))
+ if (ipStatus == NETSTATUS_IP_STATUS_OK)
state |= QNetworkConfiguration::Active;
QMutexLocker locker(&mutex);