diff mbox series

[BlueZ,v3,4/7] client: Install submenus before contacting bluez daemon

Message ID 20241022141118.150143-5-hadess@hadess.net (mailing list archive)
State New
Headers show
Series Fix bluetoothctl --help hanging if daemon isn't running | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Bastien Nocera Oct. 22, 2024, 2:10 p.m. UTC
So that the submenus are installed even if bluez isn't available.
---
 client/main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/client/main.c b/client/main.c
index 17af62000f6d..f60bef1a6d3a 100644
--- a/client/main.c
+++ b/client/main.c
@@ -3187,6 +3187,10 @@  int main(int argc, char *argv[])
 	bt_shell_add_submenu(&advertise_monitor_menu);
 	bt_shell_add_submenu(&scan_menu);
 	bt_shell_add_submenu(&gatt_menu);
+	admin_add_submenu();
+	player_add_submenu();
+	mgmt_add_submenu();
+	assistant_add_submenu();
 	bt_shell_set_prompt(PROMPT_OFF, NULL);
 
 	if (agent_option)
@@ -3203,13 +3207,9 @@  int main(int argc, char *argv[])
 		bt_shell_set_env("AUTO_REGISTER_ENDPOINT",
 					(void *)endpoint_option);
 
-	admin_add_submenu();
 	admin_enable_submenu();
-	player_add_submenu();
 	player_enable_submenu();
-	mgmt_add_submenu();
 	mgmt_enable_submenu();
-	assistant_add_submenu();
 	assistant_enable_submenu();
 
 	client = g_dbus_client_new(dbus_conn, "org.bluez", "/org/bluez");