Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] advertising: Fix setting discoverable flag only for peripheral
@ 2018-02-20 15:13 Szymon Janc
  2018-02-20 16:21 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 4+ messages in thread
From: Szymon Janc @ 2018-02-20 15:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

General Discoverable mode can also be set for non-connectable
advertising. This was affecting GAP/DISC/GENM/BV-03-C qualification
testcase.
---
 src/advertising.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/advertising.c b/src/advertising.c
index 38d2a2d1f..6e227d4d1 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -622,12 +622,11 @@ static int refresh_adv(struct btd_adv_client *client, mgmt_request_func_t func)
 
 	DBG("Refreshing advertisement: %s", client->path);
 
-	if (client->type == AD_TYPE_PERIPHERAL) {
+	if (client->type == AD_TYPE_PERIPHERAL)
 		flags = MGMT_ADV_FLAG_CONNECTABLE;
 
-		if (btd_adapter_get_discoverable(client->manager->adapter))
-			flags |= MGMT_ADV_FLAG_DISCOV;
-	}
+	if (btd_adapter_get_discoverable(client->manager->adapter))
+		flags |= MGMT_ADV_FLAG_DISCOV;
 
 	flags |= client->flags;
 
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-21  9:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20 15:13 [PATCH] advertising: Fix setting discoverable flag only for peripheral Szymon Janc
2018-02-20 16:21 ` Luiz Augusto von Dentz
2018-02-21  7:59   ` Szymon Janc
2018-02-21  9:25     ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox