mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-28 00:35:42 +00:00
l2cap: send extended features request only once per hci connection
This commit is contained in:
parent
6ddb7e9c36
commit
0ad3603fa1
10
src/l2cap.c
10
src/l2cap.c
@ -2403,12 +2403,14 @@ static void l2cap_hci_event_handler(uint8_t packet_type, uint16_t cid, uint8_t *
|
|||||||
#ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
|
#ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
|
||||||
// we need to know if ERTM is supported before sending a config response
|
// we need to know if ERTM is supported before sending a config response
|
||||||
hci_connection_t * connection = hci_connection_for_handle(channel->con_handle);
|
hci_connection_t * connection = hci_connection_for_handle(channel->con_handle);
|
||||||
connection->l2cap_state.information_state = L2CAP_INFORMATION_STATE_W2_SEND_EXTENDED_FEATURE_REQUEST;
|
if (connection->l2cap_state.information_state != L2CAP_INFORMATION_STATE_DONE){
|
||||||
channel->state = L2CAP_STATE_WAIT_INCOMING_EXTENDED_FEATURES;
|
connection->l2cap_state.information_state = L2CAP_INFORMATION_STATE_W2_SEND_EXTENDED_FEATURE_REQUEST;
|
||||||
#else
|
channel->state = L2CAP_STATE_WAIT_INCOMING_EXTENDED_FEATURES;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
channel->state = L2CAP_STATE_WAIT_CLIENT_ACCEPT_OR_REJECT;
|
channel->state = L2CAP_STATE_WAIT_CLIENT_ACCEPT_OR_REJECT;
|
||||||
l2cap_emit_incoming_connection(channel);
|
l2cap_emit_incoming_connection(channel);
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
channel->reason = 0x0003; // security block
|
channel->reason = 0x0003; // security block
|
||||||
channel->state = L2CAP_STATE_WILL_SEND_CONNECTION_RESPONSE_DECLINE;
|
channel->state = L2CAP_STATE_WILL_SEND_CONNECTION_RESPONSE_DECLINE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user