- if (check_reply_has_dict(reply) == FALSE)
- goto done;
-
- values_received = TRUE;
-
- dbus_message_iter_init(reply, &iter);
- dbus_message_iter_recurse(&iter, &dict);
- while (dbus_message_iter_get_arg_type(&dict) == DBUS_TYPE_DICT_ENTRY) {
- DBusMessageIter entry, value;
-
- dbus_message_iter_recurse(&dict, &entry);
- if (dbus_message_iter_get_arg_type(&entry) != DBUS_TYPE_STRING)
- break;
-
- dbus_message_iter_get_basic(&entry, &key);
-
- if (g_str_equal(key, "Identity")) {
- dbus_message_iter_next(&entry);
- if (dbus_message_iter_get_arg_type(&entry)
- != DBUS_TYPE_VARIANT)
- break;
- dbus_message_iter_recurse(&entry, &value);
- dbus_message_iter_get_basic(&value, &identity);
-
- } else if (g_str_equal(key, "Passphrase")) {
- dbus_message_iter_next(&entry);
- if (dbus_message_iter_get_arg_type(&entry) != DBUS_TYPE_VARIANT)
- break;
- dbus_message_iter_recurse(&entry, &value);
- dbus_message_iter_get_basic(&value, &passphrase);
-
- } else if (g_str_equal(key, "WPS")) {
- wps = TRUE;
-
- dbus_message_iter_next(&entry);
- if (dbus_message_iter_get_arg_type(&entry)
- != DBUS_TYPE_VARIANT)
- break;
- dbus_message_iter_recurse(&entry, &value);
- dbus_message_iter_get_basic(&value, &wpspin);
- break;
- } else if (g_str_equal(key, "Name")) {
- dbus_message_iter_next(&entry);
- if (dbus_message_iter_get_arg_type(&entry)
- != DBUS_TYPE_VARIANT)
- break;
- dbus_message_iter_recurse(&entry, &value);
- dbus_message_iter_get_basic(&value, &name);
- name_len = strlen(name);
- } else if (g_str_equal(key, "SSID")) {
- dbus_message_iter_next(&entry);
- if (dbus_message_iter_get_arg_type(&entry)
- != DBUS_TYPE_VARIANT)
- break;
- dbus_message_iter_recurse(&entry, &value);
- if (dbus_message_iter_get_arg_type(&value)
- != DBUS_TYPE_VARIANT)
- break;
- if (dbus_message_iter_get_element_type(&value)
- != DBUS_TYPE_VARIANT)
- break;
- dbus_message_iter_get_fixed_array(&value, &name,
- &name_len);
- }
- dbus_message_iter_next(&dict);