void netconfig_set_mac_address_to_vconf(const char *def_mac)
{
int mac_len = 0;
+ gchar *mac_lower_str = NULL;
mac_len = strlen(def_mac);
if (mac_len < 17) {
return;
}
- netconfig_set_vconf_str(VCONFKEY_WIFI_BSSID_ADDRESS, def_mac, TRUE);
+ mac_lower_str = g_ascii_strdown(def_mac, (gssize)mac_len);
+ netconfig_set_vconf_str(VCONFKEY_WIFI_BSSID_ADDRESS, mac_lower_str, TRUE);
+ g_free(mac_lower_str);
}
void netconfig_set_mac_address_from_file(void)
return;
}
- mac_lower_str = g_ascii_strup(mac_str, (gssize)mac_len);
+ mac_lower_str = g_ascii_strdown(mac_str, (gssize)mac_len);
netconfig_set_vconf_str(VCONFKEY_WIFI_BSSID_ADDRESS, mac_lower_str, TRUE);
g_free(mac_lower_str);
gchar *mac_addr = NULL;
mac_addr = vconf_get_str(VCONFKEY_WIFI_BSSID_ADDRESS);
- if (mac_addr == NULL || strlen(mac_addr) == 0) {
+ if (mac_addr == NULL || strlen(mac_addr) < 17) {
if (wifi_def_mac)
netconfig_set_mac_address_to_vconf(wifi_def_mac);
else