From e12b97e7622a9cb1c7b76b777e38758ddcfcc7c2 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Mon, 18 Dec 2017 18:48:10 -0800 Subject: binding: wifi: fix logic check and reduce error messages Don't attempt to keep checking wifi state if there isn't wifi card detected by Connman on startup. Also check the error state of setHMIStatus() to deduce if another attempt is required. Bug-AGL: SPEC-1201 Change-Id: Ica9dc3db62ad1b41a86b365edae0bf4e3447db16 Signed-off-by: Matt Ranostay (cherry picked from commit 4c41e635d3006ee847079dd28d8333a58ac8e71f) --- binding-wifi/wifi-api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binding-wifi/wifi-api.c b/binding-wifi/wifi-api.c index 45341e3..2117d6d 100644 --- a/binding-wifi/wifi-api.c +++ b/binding-wifi/wifi-api.c @@ -678,13 +678,13 @@ gboolean initial_homescreen(gpointer ptr) if (ret < 0) { g_object_unref(status); - return TRUE; + return FALSE; } error = setHMIStatus(status->connected == 1 ? BAR_FULL : BAR_NO); g_error_free(error); - return ret != NULL; + return error != NULL; } static void *thread_func() -- cgit 1.2.3-korg