From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 2/8] tools/bluetooth-player: Only enable attach input when connected
Date: Wed, 21 Feb 2018 16:14:50 +0200 [thread overview]
Message-ID: <20180221141456.6656-2-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20180221141456.6656-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
tools/bluetooth-player.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/bluetooth-player.c b/tools/bluetooth-player.c
index 709ef5633..32ae4f6bb 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);
--
2.14.3
next prev parent reply other threads:[~2018-02-21 14:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 14:14 [PATCH BlueZ 1/8] shared/shell: Add non-interactive mode Luiz Augusto von Dentz
2018-02-21 14:14 ` Luiz Augusto von Dentz [this message]
2018-02-21 14:14 ` [PATCH BlueZ 3/8] tools/obexctl: Only enable attach input when connected Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 4/8] shared/shell: Set NON_INTERACTIVE env Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 5/8] client: Don't auto register agent on non-interactive mode Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 6/8] shared/mainloop: Add GLIB wrapper Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 7/8] shared/util: Add strdelimit and strsuffix Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 8/8] shared/shell: Use mainloop wrappers instead of GLIB directly Luiz Augusto von Dentz
2018-02-22 9:56 ` [PATCH BlueZ 1/8] shared/shell: Add non-interactive mode Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180221141456.6656-2-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).