diff mbox series

[bluez] adapter: Prepend the new added device to the adapter devices list

Message ID 20250225-leaudio-no-media-v1-1-6da9454067d3@amlogic.com (mailing list archive)
State Superseded
Headers show
Series [bluez] adapter: Prepend the new added device to the adapter devices list | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
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/ScanBuild success Scan Build PASS

Commit Message

Ye He via B4 Relay Feb. 25, 2025, 9:04 a.m. UTC
From: "ye.he" <ye.he@amlogic.com>

When the DUT is paired with a mobile phone using RPA multiple times,
multiple device contexts with the same bdaddr will be cached.
When we query the device context through bdaddr, we always get the
context at the head of adapter->devices, but its status is inactive.

https://github.com/bluez/bluez/issues/1095

Signed-off-by: ye.he <ye.he@amlogic.com>
---
 src/adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 0845b8f6ef2ac004b1c953cf4fe4ca3458cd8e36
change-id: 20250225-leaudio-no-media-634423086ea4

Best regards,

Comments

bluez.test.bot@gmail.com Feb. 25, 2025, 10:11 a.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=937409

---Test result---

Test Summary:
CheckPatch                    PENDING   0.18 seconds
GitLint                       PENDING   0.24 seconds
BuildEll                      PASS      20.30 seconds
BluezMake                     PASS      1519.90 seconds
MakeCheck                     PASS      13.31 seconds
MakeDistcheck                 PASS      156.26 seconds
CheckValgrind                 PASS      211.94 seconds
CheckSmatch                   PASS      281.87 seconds
bluezmakeextell               PASS      97.31 seconds
IncrementalBuild              PENDING   0.38 seconds
ScanBuild                     PASS      849.10 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth
Paul Menzel Feb. 25, 2025, 12:35 p.m. UTC | #2
Dear Ye,


Thank you for your patch.

Am 25.02.25 um 10:04 schrieb ye.he via B4 Relay:
> From: "ye.he" <ye.he@amlogic.com>

I’d be great if you could spell your name *Ye He*.

     $ git config --global user.name "Ye He"
     $ git commit --amend --author="Ye He <ye.he@amlogic.com>"

> When the DUT is paired with a mobile phone using RPA multiple times,
> multiple device contexts with the same bdaddr will be cached.
> When we query the device context through bdaddr, we always get the
> context at the head of adapter->devices, but its status is inactive.
> 
> https://github.com/bluez/bluez/issues/1095
> 
> Signed-off-by: ye.he <ye.he@amlogic.com>

Ditto.

> ---
>   src/adapter.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

[…]


Kind regards,

Paul
diff mbox series

Patch

diff --git a/src/adapter.c b/src/adapter.c
index 2bb94cf1673e85710abf1e619fdeee9c9fa0f087..d675f0b1575a21bc345cbdb003411cf188fdd314 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -5243,7 +5243,7 @@  void device_resolved_drivers(struct btd_adapter *adapter,
 static void adapter_add_device(struct btd_adapter *adapter,
 						struct btd_device *device)
 {
-	adapter->devices = g_slist_append(adapter->devices, device);
+	adapter->devices = g_slist_prepend(adapter->devices, device);
 	device_added_drivers(adapter, device);
 }