2022-04-10 02:29:12

by Jakob Hilmer

[permalink] [raw]
Subject: [PATCH BlueZ 1/1] adapter: Fix check of DISCOVERABLE setting

From: Jakob hilmer <[email protected]>

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)) {
--
2.25.1


2022-04-10 10:00:32

by bluez.test.bot

[permalink] [raw]
Subject: RE: adapter: Fix check of DISCOVERABLE setting

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=630676

---Test result---

Test Summary:
CheckPatch PASS 0.66 seconds
GitLint PASS 0.45 seconds
Prep - Setup ELL PASS 51.55 seconds
Build - Prep PASS 0.63 seconds
Build - Configure PASS 10.14 seconds
Build - Make PASS 1804.83 seconds
Make Check PASS 13.03 seconds
Make Check w/Valgrind PASS 543.20 seconds
Make Distcheck PASS 281.40 seconds
Build w/ext ELL - Configure PASS 10.09 seconds
Build w/ext ELL - Make PASS 1793.76 seconds
Incremental Build with patchesPASS 0.00 seconds



---
Regards,
Linux Bluetooth

2022-04-10 17:53:14

by Paul Menzel

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

Dear Jakob,


Am 09.04.22 um 12:01 schrieb Jakob Hilmer:
> From: Jakob hilmer <[email protected]>

*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 <[email protected]>


Kind regards,

Paul