diff mbox series

[BlueZ,v1] device: Fix marking device as temporary

Message ID 20240613170313.1596181-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 48b7f7e5fe53b434f388a8b85cc0996853b3567c
Headers show
Series [BlueZ,v1] device: Fix marking device as temporary | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Luiz Augusto von Dentz June 13, 2024, 5:03 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If bonding has failed but there are other bearers connected don't mark
the device as temporary.

Fixes: https://github.com/bluez/bluez/issues/856
---
 src/device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com June 13, 2024, 6:44 p.m. UTC | #1
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=861741

---Test result---

Test Summary:
CheckPatch                    PASS      0.49 seconds
GitLint                       PASS      0.34 seconds
BuildEll                      PASS      24.74 seconds
BluezMake                     PASS      1779.73 seconds
MakeCheck                     PASS      12.94 seconds
MakeDistcheck                 PASS      178.01 seconds
CheckValgrind                 PASS      251.64 seconds
CheckSmatch                   PASS      352.13 seconds
bluezmakeextell               PASS      119.39 seconds
IncrementalBuild              PASS      1681.50 seconds
ScanBuild                     PASS      1031.29 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org June 14, 2024, 3 p.m. UTC | #2
Hello:

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

On Thu, 13 Jun 2024 13:03:13 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> If bonding has failed but there are other bearers connected don't mark
> the device as temporary.
> 
> Fixes: https://github.com/bluez/bluez/issues/856
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1] device: Fix marking device as temporary
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=48b7f7e5fe53

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index 5dc1cd0cdbf2..486ffdb4ea8d 100644
--- a/src/device.c
+++ b/src/device.c
@@ -6428,7 +6428,8 @@  void device_bonding_complete(struct btd_device *device, uint8_t bdaddr_type,
 		/* 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) &&
+		if (!btd_device_bearer_is_connected(device) &&
+				!device_is_paired(device, bdaddr_type) &&
 				!btd_device_is_trusted(device))
 			btd_device_set_temporary(device, true);