From 1a59707bfae34402ebff5c53ee74f1b92f84e97a Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 26 Jul 2018 15:40:55 +0300 Subject: [PATCH] client: Add scan.clear discoverable This implements scan.clear for discoverable filter. Change-Id: I0fe8d6c6ba54be0ae37479edd88f47a4b71012c5 Signed-off-by: himanshu --- client/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index c4d6e3c..1cd19f5 100644 --- a/client/main.c +++ b/client/main.c @@ -1419,6 +1419,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); @@ -1430,6 +1435,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 }, {} }; @@ -2545,7 +2551,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.7.4