* [PATCH BlueZ 1/2] adapter: Fix not using the correct setting
@ 2021-03-04 22:24 Luiz Augusto von Dentz
2021-03-04 22:24 ` [PATCH BlueZ 2/2] adapter: Return Busy error when setting is pending Luiz Augusto von Dentz
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2021-03-04 22:24 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
set_mode shall use opcode to identify what setting are being changed
rather then the mode.
---
src/adapter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/adapter.c b/src/adapter.c
index 051c32753..f483cc827 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -631,7 +631,7 @@ static bool set_mode(struct btd_adapter *adapter, uint16_t opcode,
memset(&cp, 0, sizeof(cp));
cp.val = mode;
- switch (mode) {
+ switch (opcode) {
case MGMT_OP_SET_POWERED:
setting = MGMT_SETTING_POWERED;
break;
--
2.29.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH BlueZ 2/2] adapter: Return Busy error when setting is pending
2021-03-04 22:24 [PATCH BlueZ 1/2] adapter: Fix not using the correct setting Luiz Augusto von Dentz
@ 2021-03-04 22:24 ` Luiz Augusto von Dentz
2021-03-04 22:38 ` [BlueZ,1/2] adapter: Fix not using the correct setting bluez.test.bot
2021-03-05 7:34 ` [PATCH BlueZ 1/2] " Bastien Nocera
2 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2021-03-04 22:24 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This returns an error if application attempts to change a property that
is pending.
Fixes: https://github.com/bluez/bluez/issues/99
---
src/adapter.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/adapter.c b/src/adapter.c
index f483cc827..cc0849f99 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2880,12 +2880,18 @@ static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
dbus_message_iter_get_basic(value, &enable);
+ if (adapter->pending_settings & setting) {
+ g_dbus_pending_property_error(id, ERROR_INTERFACE ".Busy",
+ NULL);
+ return;
+ }
+
if (adapter->current_settings & setting)
current_enable = TRUE;
else
current_enable = FALSE;
- if (enable == current_enable || adapter->pending_settings & setting) {
+ if (enable == current_enable) {
g_dbus_pending_property_success(id);
return;
}
--
2.29.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [BlueZ,1/2] adapter: Fix not using the correct setting
2021-03-04 22:24 [PATCH BlueZ 1/2] adapter: Fix not using the correct setting Luiz Augusto von Dentz
2021-03-04 22:24 ` [PATCH BlueZ 2/2] adapter: Return Busy error when setting is pending Luiz Augusto von Dentz
@ 2021-03-04 22:38 ` bluez.test.bot
2021-03-06 1:17 ` Luiz Augusto von Dentz
2021-03-05 7:34 ` [PATCH BlueZ 1/2] " Bastien Nocera
2 siblings, 1 reply; 6+ messages in thread
From: bluez.test.bot @ 2021-03-04 22:38 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 557 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=442263
---Test result---
##############################
Test: CheckPatch - PASS
##############################
Test: CheckGitLint - PASS
##############################
Test: CheckBuild - PASS
##############################
Test: MakeCheck - PASS
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ 1/2] adapter: Fix not using the correct setting
2021-03-04 22:24 [PATCH BlueZ 1/2] adapter: Fix not using the correct setting Luiz Augusto von Dentz
2021-03-04 22:24 ` [PATCH BlueZ 2/2] adapter: Return Busy error when setting is pending Luiz Augusto von Dentz
2021-03-04 22:38 ` [BlueZ,1/2] adapter: Fix not using the correct setting bluez.test.bot
@ 2021-03-05 7:34 ` Bastien Nocera
2 siblings, 0 replies; 6+ messages in thread
From: Bastien Nocera @ 2021-03-05 7:34 UTC (permalink / raw)
To: Luiz Augusto von Dentz, linux-bluetooth
On Thu, 2021-03-04 at 14:24 -0800, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> set_mode shall use opcode to identify what setting are being changed
> rather then the mode.
What was the symptom of this bug?
> ---
> src/adapter.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 051c32753..f483cc827 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -631,7 +631,7 @@ static bool set_mode(struct btd_adapter *adapter,
> uint16_t opcode,
> memset(&cp, 0, sizeof(cp));
> cp.val = mode;
>
> - switch (mode) {
> + switch (opcode) {
> case MGMT_OP_SET_POWERED:
> setting = MGMT_SETTING_POWERED;
> break;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BlueZ,1/2] adapter: Fix not using the correct setting
2021-03-04 22:38 ` [BlueZ,1/2] adapter: Fix not using the correct setting bluez.test.bot
@ 2021-03-06 1:17 ` Luiz Augusto von Dentz
2021-03-06 10:10 ` Bastien Nocera
0 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2021-03-06 1:17 UTC (permalink / raw)
To: linux-bluetooth
Hi,
On Thu, Mar 4, 2021 at 2:38 PM <bluez.test.bot@gmail.com> wrote:
>
> 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=442263
>
> ---Test result---
>
> ##############################
> Test: CheckPatch - PASS
>
> ##############################
> Test: CheckGitLint - PASS
>
> ##############################
> Test: CheckBuild - PASS
>
> ##############################
> Test: MakeCheck - PASS
>
>
>
> ---
> Regards,
> Linux Bluetooth
Applied.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BlueZ,1/2] adapter: Fix not using the correct setting
2021-03-06 1:17 ` Luiz Augusto von Dentz
@ 2021-03-06 10:10 ` Bastien Nocera
0 siblings, 0 replies; 6+ messages in thread
From: Bastien Nocera @ 2021-03-06 10:10 UTC (permalink / raw)
To: Luiz Augusto von Dentz, linux-bluetooth
On Fri, 2021-03-05 at 17:17 -0800, Luiz Augusto von Dentz wrote:
> Hi,
>
> On Thu, Mar 4, 2021 at 2:38 PM <bluez.test.bot@gmail.com> wrote:
> >
> > 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=442263
> >
> > ---Test result---
> >
> > ##############################
> > Test: CheckPatch - PASS
> >
> > ##############################
> > Test: CheckGitLint - PASS
> >
> > ##############################
> > Test: CheckBuild - PASS
> >
> > ##############################
> > Test: MakeCheck - PASS
> >
> >
> >
> > ---
> > Regards,
> > Linux Bluetooth
>
> Applied.
You didn't reply to my question about the patch.
I can't wait until we don't have to use mailing-lists to submit
patches.
Sigh.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-06 10:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 22:24 [PATCH BlueZ 1/2] adapter: Fix not using the correct setting Luiz Augusto von Dentz
2021-03-04 22:24 ` [PATCH BlueZ 2/2] adapter: Return Busy error when setting is pending Luiz Augusto von Dentz
2021-03-04 22:38 ` [BlueZ,1/2] adapter: Fix not using the correct setting bluez.test.bot
2021-03-06 1:17 ` Luiz Augusto von Dentz
2021-03-06 10:10 ` Bastien Nocera
2021-03-05 7:34 ` [PATCH BlueZ 1/2] " Bastien Nocera
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.