* [PATCH v2] device: Remove device after all bearers are disconnected
@ 2024-09-25 8:27 Cheng Jiang
2024-09-25 10:11 ` [v2] " bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Cheng Jiang @ 2024-09-25 8:27 UTC (permalink / raw)
To: linux-bluetooth; +Cc: quic_jiaymao
For a combo mode remote, both BR/EDR and BLE may be connected.
RemoveDevice should be handled after all bearers are dropped,
otherwise, remove device is not performed in adapter_remove_connection.
---
src/device.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/device.c b/src/device.c
index f8f61e643..1c4713c3f 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3492,8 +3492,18 @@ void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type,
DBusMessage *msg = device->disconnects->data;
if (dbus_message_is_method_call(msg, ADAPTER_INTERFACE,
- "RemoveDevice"))
+ "RemoveDevice")) {
+
+ /* Don't handle the RemoveDevice msg if device is
+ * connected. For a dual mode remote, both BR/EDR
+ * and BLE may be connected, RemoveDevice should
+ * be handled after all bearers are disconnects.
+ */
+ if (device->bredr_state.connected ||
+ device->le_state.connected)
+ break;
remove_device = true;
+ }
g_dbus_send_reply(dbus_conn, msg, DBUS_TYPE_INVALID);
device->disconnects = g_slist_remove(device->disconnects, msg);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [v2] device: Remove device after all bearers are disconnected
2024-09-25 8:27 [PATCH v2] device: Remove device after all bearers are disconnected Cheng Jiang
@ 2024-09-25 10:11 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2024-09-25 10:11 UTC (permalink / raw)
To: linux-bluetooth, quic_chejiang
[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]
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=892705
---Test result---
Test Summary:
CheckPatch FAIL 0.66 seconds
GitLint PASS 0.33 seconds
BuildEll PASS 24.80 seconds
BluezMake PASS 1673.81 seconds
MakeCheck PASS 13.45 seconds
MakeDistcheck PASS 178.92 seconds
CheckValgrind PASS 249.18 seconds
CheckSmatch PASS 350.04 seconds
bluezmakeextell PASS 118.20 seconds
IncrementalBuild PASS 1504.34 seconds
ScanBuild PASS 1044.85 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v2] device: Remove device after all bearers are disconnected
WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#115: FILE: src/device.c:3501:
+ * be handled after all bearers are disconnects.
+ */
/github/workspace/src/src/13811785.patch total: 0 errors, 1 warnings, 19 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/src/13811785.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-25 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-25 8:27 [PATCH v2] device: Remove device after all bearers are disconnected Cheng Jiang
2024-09-25 10:11 ` [v2] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox