From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 4/5] client: Add scan.clear discoverable
Date: Thu, 26 Jul 2018 17:17:22 +0300 [thread overview]
Message-ID: <20180726141723.20199-4-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20180726141723.20199-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This implements scan.clear for discoverable filter.
---
client/main.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/client/main.c b/client/main.c
index 6e6f6d2fb..1a66a3ab4 100644
--- a/client/main.c
+++ b/client/main.c
@@ -1416,6 +1416,11 @@ static void filter_clear_duplicate(void)
filter.duplicate = false;
}
+static void filter_clear_discoverable(void)
+{
+ filter.discoverable = false;
+}
+
struct clear_entry {
const char *name;
void (*clear) (void);
@@ -1427,6 +1432,7 @@ static const struct clear_entry filter_clear[] = {
{ "pathloss", filter_clear_pathloss },
{ "transport", filter_clear_transport },
{ "duplicate-data", filter_clear_duplicate },
+ { "discoverable", filter_clear_discoverable },
{}
};
@@ -2539,7 +2545,8 @@ static const struct bt_shell_menu scan_menu = {
{ "discoverable", "[on/off]", cmd_scan_filter_discoverable,
"Set/Get discoverable filter",
NULL },
- { "clear", "[uuids/rssi/pathloss/transport/duplicate-data]",
+ { "clear",
+ "[uuids/rssi/pathloss/transport/duplicate-data/discoverable]",
cmd_scan_filter_clear,
"Clears discovery filter.",
filter_clear_generator },
--
2.17.1
next prev parent reply other threads:[~2018-07-26 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 14:17 [PATCH BlueZ 1/5] doc/adapter-api: Add Discoverable option to SetDiscoveryFilter Luiz Augusto von Dentz
2018-07-26 14:17 ` [PATCH BlueZ 2/5] adapter: Discovery filter discoverable Luiz Augusto von Dentz
2018-07-27 14:13 ` Bastien Nocera
2018-07-26 14:17 ` [PATCH BlueZ 3/5] client: Add scan.discoverable command Luiz Augusto von Dentz
2018-07-26 14:17 ` Luiz Augusto von Dentz [this message]
2018-07-26 14:17 ` [PATCH BlueZ 5/5] adapter: Fix not keeping discovery filters Luiz Augusto von Dentz
2018-08-01 11:59 ` [PATCH BlueZ 1/5] doc/adapter-api: Add Discoverable option to SetDiscoveryFilter Luiz Augusto von Dentz
2018-08-01 12:38 ` Bastien Nocera
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=20180726141723.20199-4-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).