mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: backend-native: Free command list queue on RFComm free
When RFComm conection is closed or lost, the pending commands should be freed, and if a DBus message is attached an error reply should be sent.
This commit is contained in:
parent
618d60a1f2
commit
1ad3fdff8a
1 changed files with 11 additions and 0 deletions
|
|
@ -411,12 +411,23 @@ static void volume_sync_stop_timer(struct rfcomm *rfcomm);
|
|||
static void rfcomm_free(struct rfcomm *rfcomm)
|
||||
{
|
||||
struct updated_call *updated_call;
|
||||
struct rfcomm_cmd *cmd;
|
||||
|
||||
spa_list_consume(updated_call, &rfcomm->updated_call_list, link) {
|
||||
spa_list_remove(&updated_call->link);
|
||||
free(updated_call);
|
||||
}
|
||||
|
||||
spa_list_consume(cmd, &rfcomm->cmd_send_queue, link) {
|
||||
if (cmd->msg) {
|
||||
telephony_send_dbus_method_reply(rfcomm->backend->telephony, cmd->msg, BT_TELEPHONY_ERROR_FAILED, 0);
|
||||
spa_clear_ptr(cmd->msg, dbus_message_unref);
|
||||
}
|
||||
|
||||
spa_list_remove(&cmd->link);
|
||||
free(cmd);
|
||||
}
|
||||
|
||||
codec_switch_stop_timer(rfcomm);
|
||||
if (rfcomm->telephony_ag) {
|
||||
telephony_ag_destroy(rfcomm->telephony_ag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue