From: Jukka Rissanen Date: Wed, 7 Nov 2012 08:14:05 +0000 (+0200) Subject: wifi: Skip service if there is error while loading its settings X-Git-Tag: 1.10~206 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ed8eb9c3de85b23cfcb6b3e4cc9616cd4d29830;p=platform%2Fupstream%2Fconnman.git 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. --- diff --git a/plugins/wifi.c b/plugins/wifi.c index 631d0cc..d2ab3b0 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);