summaryrefslogtreecommitdiffstats
path: root/src/wifi/qwifimanager.cpp
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@theqtcompany.com>2015-02-02 12:29:02 +0100
committerGatis Paeglis <gatis.paeglis@theqtcompany.com>2015-02-06 11:57:28 +0200
commit1642e42a37090de01f8a9956a139cba95ae44fe7 (patch)
tree47a212304d28b74bf2ec072f082d98e4cc965b6a /src/wifi/qwifimanager.cpp
parent8e88abe415aac6efa531ad77d8a82be5de14e6d7 (diff)
Fix failure handling when backend processes fail
Make sure that m_backendState is updated accordingly if backend initialization and/or termination fails. Change-Id: I28b6dbb3ecbefb14edbc9ffe5d4497b8ddc37946 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/wifi/qwifimanager.cpp')
-rw-r--r--src/wifi/qwifimanager.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wifi/qwifimanager.cpp b/src/wifi/qwifimanager.cpp
index e971fd1..bc236f2 100644
--- a/src/wifi/qwifimanager.cpp
+++ b/src/wifi/qwifimanager.cpp
@@ -147,8 +147,7 @@ void QWifiManagerPrivate::updateWifiState()
if (ps.readAll().contains("wpa_supplicant"))
supplicantRunning = true;
#endif
- if (supplicantRunning) {
- m_wifiController->resetSupplicantSocket();
+ if (supplicantRunning && m_wifiController->resetSupplicantSocket()) {
m_wifiController->startWifiEventThread();
m_backendState = QWifiManager::Running;
}