Diff between 0985a5943a29ca8e2cb2ffeb83b0cbd7914fd2dc and 6962320860a6bc4651d915cce7954d0ba94425ab

Changed Files

File Additions Deletions Status
tools/bluetooth-player.c +2 -1 modified

Full Patch

diff --git a/tools/bluetooth-player.c b/tools/bluetooth-player.c
index 709ef56..32ae4f6 100644
--- a/tools/bluetooth-player.c
+++ b/tools/bluetooth-player.c
@@ -57,11 +57,13 @@ static GList *items = NULL;
 
 static void connect_handler(DBusConnection *connection, void *user_data)
 {
+	bt_shell_attach(fileno(stdin));
 	bt_shell_set_prompt(PROMPT_ON);
 }
 
 static void disconnect_handler(DBusConnection *connection, void *user_data)
 {
+	bt_shell_detach();
 	bt_shell_set_prompt(PROMPT_OFF);
 }
 
@@ -1124,7 +1126,6 @@ int main(int argc, char *argv[])
 	bt_shell_init(argc, argv, NULL);
 	bt_shell_set_menu(&main_menu);
 	bt_shell_set_prompt(PROMPT_OFF);
-	bt_shell_attach(fileno(stdin));
 
 	dbus_conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, NULL, NULL);