From 7ed8eb9c3de85b23cfcb6b3e4cc9616cd4d29830 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 7 Nov 2012 10:14:05 +0200 Subject: wifi: Skip service if there is error while loading its settings If service settings cannot be loaded, then skip that service. Thanks for Felipe Tonello for reporting the issue. --- plugins/wifi.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/wifi.c b/plugins/wifi.c index 631d0cc3..d2ab3b0d 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -384,6 +384,8 @@ static int get_hidden_connections(int max_ssids, continue; keyfile = connman_storage_load_service(services[i]); + if (keyfile == NULL) + continue; value = g_key_file_get_boolean(keyfile, services[i], "Hidden", NULL); @@ -825,6 +827,8 @@ static int get_latest_connections(int max_ssids, continue; keyfile = connman_storage_load_service(services[i]); + if (keyfile == NULL) + continue; str = g_key_file_get_string(keyfile, services[i], "Favorite", NULL); -- cgit v1.2.3