diff mbox series

[BlueZ,1/1] src/adapter: Check if device is connected before clean up

Message ID 20240617075934.154540-2-vlad.pruteanu@nxp.com (mailing list archive)
State Accepted
Commit 7ff745c2bd0c2656a7022ee11c67c6d8dc8494a6
Headers show
Series src/adapter: Check if device is connected before clean up | 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

Vlad Pruteanu June 17, 2024, 7:59 a.m. UTC
Broadcast sources are currently deleted on the clean up triggered
by turning scan off. Thix fix prevents the removal of sources to
which we are synced by also checking if the device that will be
removed is connected (sources to which we are synced are already
marked as connected).
---
 src/adapter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com June 17, 2024, 9:44 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=862501

---Test result---

Test Summary:
CheckPatch                    PASS      0.27 seconds
GitLint                       PASS      0.20 seconds
BuildEll                      PASS      24.35 seconds
BluezMake                     PASS      1735.49 seconds
MakeCheck                     PASS      12.98 seconds
MakeDistcheck                 PASS      184.47 seconds
CheckValgrind                 PASS      250.09 seconds
CheckSmatch                   PASS      351.15 seconds
bluezmakeextell               PASS      118.87 seconds
IncrementalBuild              PASS      1436.67 seconds
ScanBuild                     PASS      975.58 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/adapter.c b/src/adapter.c
index 821d94592..bdc5bf920 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1730,7 +1730,8 @@  static void discovery_cleanup(struct btd_adapter *adapter, int timeout)
 
 		next = g_slist_next(l);
 
-		if (device_is_temporary(dev) && !device_is_connectable(dev))
+		if (device_is_temporary(dev) && !device_is_connectable(dev)
+			&& !btd_device_is_connected(dev))
 			btd_adapter_remove_device(adapter, dev);
 	}
 }