mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-01 10:13:29 +00:00
l2cap: fix accept incoming ERTM connection when Information Request already complete
This commit is contained in:
parent
378b1cb274
commit
7dfda25627
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- HFP HF: emit HFP_SUBEVENT_TRANSMIT_DTMF_CODES after sending DTMF command
|
- HFP HF: emit HFP_SUBEVENT_TRANSMIT_DTMF_CODES after sending DTMF command
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- L2CAP: Fix accept incoming ERTM connection when Information Request already complete
|
||||||
- HFP AG: activate all AG indicators upon service level connection establishment
|
- HFP AG: activate all AG indicators upon service level connection establishment
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
12
src/l2cap.c
12
src/l2cap.c
@ -720,20 +720,18 @@ uint8_t l2cap_ertm_accept_connection(uint16_t local_cid, l2cap_ertm_config_t * e
|
|||||||
// configure L2CAP ERTM
|
// configure L2CAP ERTM
|
||||||
l2cap_ertm_configure_channel(channel, ertm_config, buffer, size);
|
l2cap_ertm_configure_channel(channel, ertm_config, buffer, size);
|
||||||
|
|
||||||
// already available?
|
// we need to know if ERTM is supported before sending a config response
|
||||||
|
channel->state = L2CAP_STATE_WAIT_INCOMING_EXTENDED_FEATURES;
|
||||||
hci_connection_t * connection = hci_connection_for_handle(channel->con_handle);
|
hci_connection_t * connection = hci_connection_for_handle(channel->con_handle);
|
||||||
btstack_assert(connection != NULL);
|
btstack_assert(connection != NULL);
|
||||||
|
|
||||||
// we need to know if ERTM is supported before sending a config response
|
|
||||||
switch (connection->l2cap_state.information_state){
|
switch (connection->l2cap_state.information_state){
|
||||||
|
case L2CAP_INFORMATION_STATE_IDLE:
|
||||||
|
connection->l2cap_state.information_state = L2CAP_INFORMATION_STATE_W2_SEND_EXTENDED_FEATURE_REQUEST;
|
||||||
|
break;
|
||||||
case L2CAP_INFORMATION_STATE_DONE:
|
case L2CAP_INFORMATION_STATE_DONE:
|
||||||
l2cap_handle_information_request_complete(connection);
|
l2cap_handle_information_request_complete(connection);
|
||||||
break;
|
break;
|
||||||
case L2CAP_INFORMATION_STATE_IDLE:
|
|
||||||
connection->l2cap_state.information_state = L2CAP_INFORMATION_STATE_W2_SEND_EXTENDED_FEATURE_REQUEST;
|
|
||||||
/* fall through */
|
|
||||||
default:
|
default:
|
||||||
channel->state = L2CAP_STATE_WAIT_INCOMING_EXTENDED_FEATURES;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user