adapter: Fix not using the correct setting
Luiz Augusto von Dentz
maintainerPATCH 1/2 adapter: Fix not using the correct setting
From: Luiz Augusto von Dentz <[email protected]>
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(-)
src/adapter.c +1 -1
@@ -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 ;
Signature · 1 line
2.29.2
Luiz Augusto von Dentz
maintainerPATCH 2/2 adapter: Return Busy error when setting is pending
From: Luiz Augusto von Dentz <[email protected]>
This returns an error if application attempts to change a property that is pending.
--- src/adapter.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
src/adapter.c +7 -1
@@ -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 ; }
Signature · 1 line
2.29.2
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
Hi,
Quoted 20 lines · On Thu, Mar 4, 2021 at 2:38 PM <[email protected]> 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
Quoted 8 lines
##############################
Test: MakeCheck - PASS---
Regards,
Linux Bluetooth
Applied.
Signature · 1 line
Luiz Augusto von Dentz
Quoted 30 lines · Luiz Augusto von Dentz
Hi,
Quoted 27 lines · On Thu, Mar 4, 2021 at 2:38 PM <[email protected]> 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
Quoted 5 lines
Quoted 3 lines
---
Regards,
Linux BluetoothApplied.
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.
Quoted 4 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
set_modeshall use opcode to identify what setting are being changed rather then the mode.
What was the symptom of this bug?
Quoted 18 lines
---
src/adapter.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)src/adapter.c +0
-0@@ -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) {
caseMGMT_OP_SET_POWERED:
setting =MGMT_SETTING_POWERED;
break;