static int __netconfig_wifi_update_and_get_rssi(void)
{
- const char *if_path = NULL;
+ char *if_path = NULL;
GVariant *message = NULL;
GVariant *value = NULL;
gchar *key;
message = netconfig_invoke_dbus_method(SUPPLICANT_SERVICE, if_path,
SUPPLICANT_INTERFACE ".Interface", "SignalPoll", NULL);
+
+ g_free(if_path);
if (message == NULL) {
ERR("Fail to get SignalPoll from wpa_supplicant");
return 0;
g_variant_get(message, "(v)", &value);
g_variant_get(value, "a{sv}", &iter);
+ if (iter == NULL) {
+ ERR("Fail to get list from SignalPoll");
+ return 0;
+ }
+
while (g_variant_iter_loop(iter, "{sv}", &key, &variant)) {
key_value = g_variant_get_int32(variant);