summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/blackberry/qbbengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/bearer/blackberry/qbbengine.cpp')
-rw-r--r--src/plugins/bearer/blackberry/qbbengine.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/bearer/blackberry/qbbengine.cpp b/src/plugins/bearer/blackberry/qbbengine.cpp
index d64a8fe20f..ab1ba9aa19 100644
--- a/src/plugins/bearer/blackberry/qbbengine.cpp
+++ b/src/plugins/bearer/blackberry/qbbengine.cpp
@@ -45,6 +45,7 @@
#include <QDebug>
#include <QThreadStorage>
#include <QStringList>
+#include <QTimer>
#include <bps/netstatus.h>
@@ -355,6 +356,9 @@ void QBBEngine::updateConfiguration(const char *interface)
changed = true;
}
+ const netstatus_ip_status_t oldIpStatus = ptr->oldIpStatus;
+ ptr->oldIpStatus = ipStatus;
+
ptrLocker.unlock();
locker.unlock();
@@ -364,7 +368,17 @@ void QBBEngine::updateConfiguration(const char *interface)
Q_EMIT configurationChanged(ptr);
} else {
+ // maybe Wifi has changed but gateway not yet ready etc.
qBearerDebug() << Q_FUNC_INFO << "configuration has not changed.";
+ if (oldIpStatus != ipStatus) { // if IP status changed
+ if (ipStatus != NETSTATUS_IP_STATUS_OK
+ && ipStatus != NETSTATUS_IP_STATUS_ERROR_NOT_UP
+ && ipStatus != NETSTATUS_IP_STATUS_ERROR_NOT_CONFIGURED) {
+ // work around race condition in netstatus API by just checking
+ // again in 300 ms
+ QTimer::singleShot(300, this, SLOT(doRequestUpdate()));
+ }
+ }
}
return;