mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +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:
parent
a306b79e8f
commit
c806e6a32a
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user