Dear Ye,
Thank you for your patch. In the summary, you could remove `src/` from
the prefix as it’s uncommon to add it there.
Am 12.07.25 um 11:23 schrieb Ye He via B4 Relay:
From: Ye He <ye.he@xxxxxxxxxxx>
When attempting to use RemoveDevice to delete a BIS source device that
was synchronized by the BIS sink scan delegator, the kernel marks the
device as disconnected due to PA sync termination. However, BlueZ is not
What is PA? PulseAudio?
notified of this disconnection and still proceeds to send MGMT Disconnect
command. The kernel responds with MGMT_STATUS_DISCONNECTED, which BlueZ
does not currently handle as a successful case. As a result, the RemoveDevice
call never completes and no D-Bus reply is returned.
Fixes: https://github.com/bluez/bluez/issues/1421
Signed-off-by: Ye He <ye.he@xxxxxxxxxxx>
---
This patch fix org.bluez.Adapter1.RemoveDevice method call timeout
when device already disconnected.
---
src/adapter.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/adapter.c b/src/adapter.c
index 79802300bedf4b25cb7c6bc3ea659c122a01efcb..5d68fa4c7dea251af4ff3b05a1ad66204c847c37 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -8619,7 +8619,8 @@ static void disconnect_complete(uint8_t status, uint16_t length,
const struct mgmt_rp_disconnect *rp = param;
struct btd_adapter *adapter = user_data;
- if (status == MGMT_STATUS_NOT_CONNECTED) {
+ if (status == MGMT_STATUS_NOT_CONNECTED ||
+ status == MGMT_STATUS_DISCONNECTED) {
btd_warn(adapter->dev_id,
"Disconnecting failed: already disconnected");
} else if (status != MGMT_STATUS_SUCCESS) {
The diff looks good to me.
Kind regards,
Paul