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

client: Don't quit on agent manager's callbacks in non-interactive mode

In non-interactive mode the agent managers' agent registration callback
precede the actual action command's callback such as 'connect'. iwctl
continues execution until anything else besides the agent registration
callback arrives unless the agent registration has failed.
This commit is contained in:
Tim Kourt 2019-08-15 11:40:42 -07:00 committed by Denis Kenzior
parent a306b79e8f
commit c806e6a32a

View File

@ -299,6 +299,7 @@ struct proxy_callback_data {
static void proxy_callback(struct l_dbus_message *message, void *user_data)
{
struct proxy_callback_data *callback_data = user_data;
const struct proxy_interface *proxy;
const char *name;
const char *text;
@ -308,9 +309,16 @@ static void proxy_callback(struct l_dbus_message *message, void *user_data)
if (command_is_interactive_mode())
return;
if (l_dbus_message_get_error(message, &name, &text))
if (l_dbus_message_get_error(message, &name, &text)) {
command_set_exit_status(EXIT_FAILURE);
goto quit;
}
proxy = callback_data->user_data;
if (!strcmp(proxy->type->interface, IWD_AGENT_MANAGER_INTERFACE))
return;
quit:
l_main_quit();
}