mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-27 10:00:43 +01:00
client: Change agent registration scenarios
Previously, agent was registered only for the interactive mode. This patch enables agent registration in non-interactive mode taking into consideration the existence of the command-line options.
This commit is contained in:
parent
1c7344fdf6
commit
13b22b3744
@ -696,14 +696,18 @@ static void get_managed_objects_callback(struct l_dbus_message *message,
|
|||||||
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);
|
||||||
|
|
||||||
if (!command_is_interactive_mode()) {
|
if (!command_is_interactive_mode() && !command_has_options())
|
||||||
command_noninteractive_trigger();
|
goto proceed;
|
||||||
|
|
||||||
|
if (!agent_manager_register_agent()) {
|
||||||
|
l_main_quit();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!agent_manager_register_agent()) {
|
proceed:
|
||||||
l_main_quit();
|
if (!command_is_interactive_mode()) {
|
||||||
|
command_noninteractive_trigger();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -816,7 +820,9 @@ bool dbus_proxy_exit(void)
|
|||||||
{
|
{
|
||||||
struct interface_type_desc *desc;
|
struct interface_type_desc *desc;
|
||||||
|
|
||||||
if (command_is_interactive_mode())
|
if (command_is_interactive_mode() ||
|
||||||
|
(!command_is_interactive_mode() &&
|
||||||
|
command_has_options()))
|
||||||
agent_manager_unregister_agent();
|
agent_manager_unregister_agent();
|
||||||
|
|
||||||
for (desc = __start___interface; desc < __stop___interface; desc++) {
|
for (desc = __start___interface; desc < __stop___interface; desc++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user