linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/1] adapter: Fix check of DISCOVERABLE setting
@ 2022-04-09 10:01 Jakob Hilmer
  2022-04-09 10:01 ` [PATCH BlueZ 1/1] " Jakob Hilmer
  2022-04-11 18:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 5+ messages in thread
From: Jakob Hilmer @ 2022-04-09 10:01 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakob Hilmer

While debugging problems with BT discoverable with an older version
of BlueZ. I stumbled upon this error - Two places the flag of 
`current_settings` is checked against MGMT_OP_SET_DISCOVERABLE
instead of MGMT_SETTING_DISCOVERABLE.

Jakob hilmer (1):
  adapter: Fix check of DISCOVERABLE setting

 src/adapter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.25.1


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

* [PATCH BlueZ 1/1] adapter: Fix check of DISCOVERABLE setting
  2022-04-09 10:01 [PATCH BlueZ 0/1] adapter: Fix check of DISCOVERABLE setting Jakob Hilmer
@ 2022-04-09 10:01 ` Jakob Hilmer
  2022-04-09 11:36   ` Paul Menzel
  2022-04-09 11:43   ` bluez.test.bot
  2022-04-11 18:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
  1 sibling, 2 replies; 5+ messages in thread
From: Jakob Hilmer @ 2022-04-09 10:01 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakob hilmer

From: Jakob hilmer <jakob@hilmer.dk>

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


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

* Re: [PATCH BlueZ 1/1] adapter: Fix check of DISCOVERABLE setting
  2022-04-09 10:01 ` [PATCH BlueZ 1/1] " Jakob Hilmer
@ 2022-04-09 11:36   ` Paul Menzel
  2022-04-09 11:43   ` bluez.test.bot
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Menzel @ 2022-04-09 11:36 UTC (permalink / raw)
  To: Jakob Hilmer; +Cc: linux-bluetooth

Dear Jakob,


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

*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@molgen.mpg.de>


Kind regards,

Paul

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

* RE: adapter: Fix check of DISCOVERABLE setting
  2022-04-09 10:01 ` [PATCH BlueZ 1/1] " Jakob Hilmer
  2022-04-09 11:36   ` Paul Menzel
@ 2022-04-09 11:43   ` bluez.test.bot
  1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2022-04-09 11:43 UTC (permalink / raw)
  To: linux-bluetooth, jakob

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

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


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

* Re: [PATCH BlueZ 0/1] adapter: Fix check of DISCOVERABLE setting
  2022-04-09 10:01 [PATCH BlueZ 0/1] adapter: Fix check of DISCOVERABLE setting Jakob Hilmer
  2022-04-09 10:01 ` [PATCH BlueZ 1/1] " Jakob Hilmer
@ 2022-04-11 18:20 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2022-04-11 18:20 UTC (permalink / raw)
  To: Jakob Hilmer; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Sat,  9 Apr 2022 12:01:29 +0200 you wrote:
> While debugging problems with BT discoverable with an older version
> of BlueZ. I stumbled upon this error - Two places the flag of
> `current_settings` is checked against MGMT_OP_SET_DISCOVERABLE
> instead of MGMT_SETTING_DISCOVERABLE.
> 
> Jakob hilmer (1):
>   adapter: Fix check of DISCOVERABLE setting
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/1] adapter: Fix check of DISCOVERABLE setting
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7903bbe1005b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-04-11 18:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-09 10:01 [PATCH BlueZ 0/1] adapter: Fix check of DISCOVERABLE setting Jakob Hilmer
2022-04-09 10:01 ` [PATCH BlueZ 1/1] " Jakob Hilmer
2022-04-09 11:36   ` Paul Menzel
2022-04-09 11:43   ` bluez.test.bot
2022-04-11 18:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth

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).