Re: [PATCH BlueZ 1/1] adapter: Fix check of DISCOVERABLE setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Jakob,


Am 09.04.22 um 12:01 schrieb Jakob Hilmer:
From: Jakob hilmer <jakob@xxxxxxxxx>

*H*ilmer?

The test for `DISCOVERABLE` should be done with
`MGMT_SETTING_DISCOVERABLE` instead of `MGMT_OP_SET_DISCOVERABLE`.
---
  src/adapter.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 71de9e82b..f1197684e 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1993,7 +1993,7 @@ static bool set_discovery_discoverable(struct btd_adapter *adapter, bool enable)
  		return true;
/* Reset discoverable filter if already set */
-	if (enable && (adapter->current_settings & MGMT_OP_SET_DISCOVERABLE))
+	if (enable && (adapter->current_settings & MGMT_SETTING_DISCOVERABLE))
  		return true;
adapter->discovery_discoverable = enable;
@@ -2229,7 +2229,7 @@ static int update_discovery_filter(struct btd_adapter *adapter)
  	/* Only attempt to overwrite current discoverable setting when not
  	 * discoverable.
  	 */
-	if (!(adapter->current_settings & MGMT_OP_SET_DISCOVERABLE)) {
+	if (!(adapter->current_settings & MGMT_SETTING_DISCOVERABLE)) {
  		GSList *l;
for (l = adapter->discovery_list; l; l = g_slist_next(l)) {

Acked-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>


Kind regards,

Paul



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux