2020-08-17 23:01:09

by Yu Liu

[permalink] [raw]
Subject: [Bluez PATCH v1] adapter- Device needs to be in the temporary state after pairing failure.

This caused the device hanging around as a discovered device forever
even if it is turned off or not in present.

Reviewed-by: [email protected]

---

Changes in v1:
- Initial change

src/device.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/src/device.c b/src/device.c
index bb8e07e8f..93e71850c 100644
--- a/src/device.c
+++ b/src/device.c
@@ -6008,6 +6008,12 @@ void device_bonding_complete(struct btd_device *device, uint8_t bdaddr_type,

if (status) {
device_cancel_authentication(device, TRUE);
+
+ // Put the device back to the temporary state so that it will be
+ // treated as a newly discovered device.
+ if (!device_is_paired(device, bdaddr_type))
+ btd_device_set_temporary(device, true);
+
device_bonding_failed(device, status);
return;
}
--
2.28.0.220.ged08abb693-goog


2020-08-17 23:02:44

by bluez.test.bot

[permalink] [raw]
Subject: RE: [Bluez,v1] adapter- Device needs to be in the temporary state after pairing failure.


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.
While we are preparing for reviewing the patches, we found the following
issue/warning.

Test Result:
checkgitlint Failed

Outputs:
1: T1 Title exceeds max length (73>72): "adapter- Device needs to be in the temporary state after pairing failure."
1: T3 Title has trailing punctuation (.): "adapter- Device needs to be in the temporary state after pairing failure."



---
Regards,
Linux Bluetooth