if (ret != WIFI_ERROR_NONE) {
WIFI_LOG(WIFI_ERROR, "Fail to load configurations [%d]", ret); //LCOV_EXCL_LINE
- return ret; //LCOV_EXCL_LINE
- }
+ } else {
+ h->address_family = WIFI_ADDRESS_FAMILY_IPV4;
+ h->is_saved = TRUE;
+ rv = callback((wifi_config_h)h, user_data);
+ g_free(h->name);
+ g_free(h->proxy_address);
+ if (h->eap_config) {
+ g_free(h->eap_config->ca_cert);
+ g_free(h->eap_config->client_cert);
+ g_free(h->eap_config->private_key);
+ g_free(h->eap_config->anonymous_identity);
+ g_free(h->eap_config->identity);
+ g_free(h->eap_config->subject_match);
+ g_free(h->eap_config);
+ }
+ g_free(h);
+ h = NULL;
- h->address_family = WIFI_ADDRESS_FAMILY_IPV4;
- h->is_saved = TRUE;
- rv = callback((wifi_config_h)h, user_data);
- g_free(h->name);
- g_free(h->proxy_address);
- if (h->eap_config) {
- g_free(h->eap_config->ca_cert);
- g_free(h->eap_config->client_cert);
- g_free(h->eap_config->private_key);
- g_free(h->eap_config->anonymous_identity);
- g_free(h->eap_config->identity);
- g_free(h->eap_config->subject_match);
- g_free(h->eap_config);
+ if (rv == false)
+ break;
}
- g_free(h);
- h = NULL;
-
- if (rv == false)
- break;
config_ids = config_ids->next;
}
config_ids = g_slist_nth(config_ids, 0);
g_slist_free_full(config_ids, g_free);
- return ret;
+ return WIFI_ERROR_NONE;
}
EXPORT_API int wifi_config_get_name(wifi_config_h config, char **name)