From b7347b14ba53a3d847ec783855a2c46101fafac3 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 11 Feb 2014 13:48:34 +0100 Subject: Update copyright year MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic818e79d7bfca04bd8a8d8aa12b3ff70ea26a7a3 Reviewed-by: Topi Reiniƶ --- src/imports/wifi/qwifimanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports/wifi/qwifimanager.cpp') diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 9139242..8fb8b66 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ -- cgit v1.2.3 From facedd95835540ab5040361bd7100d1908e2ec98 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 18 Feb 2014 16:23:19 +0100 Subject: [Wifi] Fix initialization code Bug was that on freshly deployed Boot2Qt image (Nexus) the current code caused a device to restart when trying to launch "launcher settings". Change-Id: I3cc55488a1993c2c74567fccf39edd189b356bac Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifimanager.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/imports/wifi/qwifimanager.cpp') diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 8fb8b66..7d6683b 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -142,19 +142,19 @@ QWifiManager::QWifiManager() } else { qWarning() << "QWifiManager: failed to connect to qconnectivity socket"; } - // check if backend has already been initialized char backend_status[PROPERTY_VALUE_MAX]; - if (property_get(QT_WIFI_BACKEND, backend_status, NULL) - && strcmp(backend_status, "running") == 0) { - // let it re-connect, in most cases this will see that everything is working properly - // and will do nothing. Special case is when process has crashed or was killed by a system - // signal in previous execution, which results in broken connection to a supplicant, - // connectToBackend will fix it.. - connectToBackend(); - } else { - // same here, cleans up the state - disconnectFromBackend(); + if (property_get(QT_WIFI_BACKEND, backend_status, NULL)) { + if (strcmp(backend_status, "running") == 0) { + // let it re-connect, in most cases this will see that everything is working properly + // and will do nothing. Special case is when process has crashed or was killed by a system + // signal in previous execution, which results in broken connection to a supplicant, + // connectToBackend will fix it.. + connectToBackend(); + } else if (strcmp(backend_status, "stopped") == 0) { + // same here, cleans up the state + disconnectFromBackend(); + } } } -- cgit v1.2.3