netconfig_default_connection_info.ifname = g_strdup(value);
}
}
+ if (iter1)
+ g_variant_iter_free(iter1);
} else if (g_strcmp0(key, "IPv4") == 0) {
g_variant_get(next, "a{sv}", &iter1);
while (g_variant_iter_loop(iter1, "{sv}", &key1, &variant)) {
netconfig_default_connection_info.ipaddress = g_strdup(value);
}
}
+ if (iter1)
+ g_variant_iter_free(iter1);
} else if (g_strcmp0(key, "IPv6") == 0) {
g_variant_get(next, "a{sv}", &iter1);
while (g_variant_iter_loop(iter1, "{sv}", &key1, &variant)) {
netconfig_default_connection_info.ipaddress6 = g_strdup(value);
}
}
+ if (iter1)
+ g_variant_iter_free(iter1);
} else if (g_strcmp0(key, "Proxy") == 0) {
g_variant_get(next, "a{sv}", &iter1);
while (g_variant_iter_loop(iter1, "{sv}", &key2, &variant2)) {
}
}
}
+ if (iter1)
+ g_variant_iter_free(iter1);
} else if (g_strcmp0(key, "Frequency") == 0) {
if (g_variant_is_of_type(next, G_VARIANT_TYPE_UINT16)) {
freq = g_variant_get_uint16(next);
int wifi_state = 0;
vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state);
- if (wifi_state == VCONFKEY_WIFI_OFF)
+ if (wifi_state == VCONFKEY_WIFI_OFF) {
+ g_free(property);
goto done;
+ }
if (g_strcmp0(property, "ready") == 0 || g_strcmp0(property, "online") == 0) {
- if (wifi_state >= VCONFKEY_WIFI_CONNECTED)
+ if (wifi_state >= VCONFKEY_WIFI_CONNECTED) {
+ g_free(property);
goto done;
+ }
netconfig_update_default_profile(path);
wifi_state_set_service_state(NETCONFIG_WIFI_FAILURE);
else
wifi_state_set_service_state(NETCONFIG_WIFI_IDLE);
+ g_free(property);
goto done;
}
- if (g_strcmp0(path, netconfig_get_default_profile()) != 0)
+ if (g_strcmp0(path, netconfig_get_default_profile()) != 0) {
+ g_free(property);
goto done;
+ }
netconfig_update_default_profile(NULL);
wifi_state_set_service_state(NETCONFIG_WIFI_ASSOCIATION);
else
wifi_state_set_service_state(NETCONFIG_WIFI_CONFIGURATION);
+ g_free(property);
goto done;
}
- if (g_strcmp0(path, netconfig_get_default_profile()) != 0)
+ if (g_strcmp0(path, netconfig_get_default_profile()) != 0) {
+ g_free(property);
goto done;
+ }
netconfig_update_default_profile(NULL);
cellular_state_set_service_state(NETCONFIG_CELLULAR_ONLINE);
} else if (g_strcmp0(property, "failure") == 0 || g_strcmp0(property, "disconnect") == 0 || g_strcmp0(property, "idle") == 0) {
- if (netconfig_get_default_profile() == NULL)
+ if (netconfig_get_default_profile() == NULL) {
+ g_free(property);
goto done;
+ }
if (netconfig_is_cellular_profile(path) && netconfig_is_cellular_internet_profile(path))
cellular_state_set_service_state(NETCONFIG_CELLULAR_IDLE);
- if (g_strcmp0(path, netconfig_get_default_profile()) != 0)
+ if (g_strcmp0(path, netconfig_get_default_profile()) != 0) {
+ g_free(property);
goto done;
+ }
netconfig_update_default_profile(NULL);
} else if (g_strcmp0(property, "association") == 0 || g_strcmp0(property, "configuration") == 0) {
- if (netconfig_get_default_profile() == NULL)
+ if (netconfig_get_default_profile() == NULL) {
+ g_free(property);
goto done;
+ }
if (netconfig_is_cellular_profile(path) && netconfig_is_cellular_internet_profile(path))
cellular_state_set_service_state(NETCONFIG_CELLULAR_CONNECTING);
- if (g_strcmp0(path, netconfig_get_default_profile()) != 0)
+ if (g_strcmp0(path, netconfig_get_default_profile()) != 0) {
+ g_free(property);
goto done;
+ }
netconfig_update_default_profile(NULL);
}
}
+ g_free(property);
} else if (g_strcmp0(sigvalue, "Proxy") == 0) {
if (netconfig_is_wifi_profile(path) != TRUE || g_strcmp0(path, netconfig_get_default_profile()) != 0)
goto done;
} else if (g_strcmp0(sigvalue, "Error") == 0) {
g_variant_get(variant, "s", &property);
INFO("[%s] Property : %s", sigvalue, property);
+ g_free(property);
}
done:
if (sigvalue)
g_strcmp0(value,
"online") != 0) {
g_free(property);
+ g_free(value);
g_variant_unref(variant);
break;
}
cellular_state_set_service_state(
NETCONFIG_CELLULAR_ONLINE);
g_free(property);
+ g_free(value);
g_variant_unref(variant);
break;
}
if (next)
g_variant_iter_free(next);
+
if (removed)
g_variant_iter_free(removed);