mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 08:37:22 +00:00
l2cap: add l2cap_ecbm_trigger_pending_connection_responses
This commit is contained in:
parent
b16d0b9c83
commit
5b2d3e1251
18
src/l2cap.c
18
src/l2cap.c
@ -3897,6 +3897,24 @@ static void l2cap_ecbm_handle_security_level_incoming(l2cap_channel_t * channel)
|
||||
}
|
||||
}
|
||||
|
||||
void l2cap_ecbm_trigger_pending_connection_responses(hci_con_handle_t con_handle){
|
||||
bool done = false;
|
||||
while (!done) {
|
||||
done = true;
|
||||
btstack_linked_list_iterator_t it;
|
||||
btstack_linked_list_iterator_init(&it, &l2cap_channels);
|
||||
while (btstack_linked_list_iterator_has_next(&it)) {
|
||||
l2cap_channel_t *channel = (l2cap_channel_t *) btstack_linked_list_iterator_next(&it);
|
||||
if (channel->channel_type != L2CAP_CHANNEL_TYPE_CHANNEL_ECBM) continue;
|
||||
if (channel->con_handle != con_handle) continue;
|
||||
if (channel->state == L2CAP_STATE_WAIT_INCOMING_SECURITY_LEVEL_UPDATE) {
|
||||
l2cap_ecbm_handle_security_level_incoming(channel);
|
||||
done = false;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int l2cap_ecbm_signaling_handler_dispatch(hci_con_handle_t handle, uint16_t signaling_cid, uint8_t *command,
|
||||
uint8_t sig_id) {
|
||||
|
||||
|
@ -800,6 +800,13 @@ uint8_t l2cap_ecbm_request_can_send_now_event(uint16_t local_cid);
|
||||
*/
|
||||
uint8_t l2cap_ecbm_reconfigure_channels(uint8_t num_cids, uint16_t * local_cids, int16_t receive_buffer_size, uint8_t ** receive_buffers);
|
||||
|
||||
/**
|
||||
* @brief Trigger pending connection responses after pairing completed
|
||||
* @note Must be called after receiving an SM_PAIRING_COMPLETE event, will be removed eventually
|
||||
* @param con_handle
|
||||
*/
|
||||
void l2cap_ecbm_trigger_pending_connection_responses(hci_con_handle_t con_handle);
|
||||
|
||||
/**
|
||||
* @brief De-Init L2CAP
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user