3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

client: Treat invalid DBus reply same as an error

This commit is contained in:
Tim Kourt 2019-10-23 13:23:56 -07:00 committed by Denis Kenzior
parent 966114ab3e
commit cfa652e9ba

View File

@ -699,7 +699,16 @@ static void get_managed_objects_callback(struct l_dbus_message *message,
return; return;
} }
l_dbus_message_get_arguments(message, "a{oa{sa{sv}}}", &objects); if (!l_dbus_message_get_arguments(message, "a{oa{sa{sv}}}", &objects)) {
l_error("Failed to parse IWD dbus objects, quitting...\n");
if (!command_is_interactive_mode())
command_set_exit_status(EXIT_FAILURE);
l_main_quit();
return;
}
while (l_dbus_message_iter_next_entry(&objects, &path, &object)) while (l_dbus_message_iter_next_entry(&objects, &path, &object))
proxy_interface_create(path, &object); proxy_interface_create(path, &object);