Skip to content

Commit 4a91935

Browse files
xiongweichaoespressif-bot
authored andcommitted
fix(bt/bluedroid): Fixed deadlock caused by not unlocking
1 parent 6c01ce3 commit 4a91935

File tree

1 file changed

+1
-3
lines changed
  • components/bt/host/bluedroid/btc/profile/std/l2cap

1 file changed

+1
-3
lines changed

components/bt/host/bluedroid/btc/profile/std/l2cap/btc_l2cap.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,6 @@ void btc_l2cap_cb_handler(btc_msg_t *msg)
906906
fixed_queue_enqueue(slot->rx.queue, p_data_buf, FIXED_QUEUE_MAX_TIMEOUT);
907907
} else {
908908
osi_free(p_data_buf);
909-
break;
910909
}
911910
}
912911
osi_mutex_unlock(&l2cap_local_param.l2cap_slot_mutex);
@@ -950,7 +949,6 @@ void btc_l2cap_cb_handler(btc_msg_t *msg)
950949
fixed_queue_enqueue(slot->rx.queue, p_data_buf, FIXED_QUEUE_MAX_TIMEOUT);
951950
} else {
952951
osi_free(p_data_buf);
953-
break;
954952
}
955953
}
956954
osi_mutex_unlock(&l2cap_local_param.l2cap_slot_mutex);
@@ -1060,7 +1058,7 @@ static ssize_t l2cap_vfs_write(int fd, const void * data, size_t size)
10601058
if (!enqueue_status) {
10611059
BTC_TRACE_DEBUG("%s tx_len:%d, fd:%d\n", __func__, fixed_queue_length(slot->tx.queue), fd);
10621060
osi_mutex_unlock(&l2cap_local_param.l2cap_slot_mutex);
1063-
//block untill under water level, be closed or time out
1061+
//block until under water level, be closed or time out
10641062
tx_event_group_val =
10651063
xEventGroupWaitBits(l2cap_local_param.tx_event_group, SLOT_WRITE_BIT(serial) | SLOT_CLOSE_BIT(serial), pdTRUE,
10661064
pdFALSE, VFS_WRITE_TIMEOUT / portTICK_PERIOD_MS);

0 commit comments

Comments
 (0)