mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 17:42:51 +00:00
fix re-entrance issue that causes l2cap event channel open to be sent twice
This commit is contained in:
parent
0acdfac72b
commit
019f9b43ba
@ -1172,6 +1172,8 @@ static int l2cap_channel_ready_for_open(l2cap_channel_t *channel){
|
||||
// log_info("l2cap_channel_ready_for_open 0x%02x", channel->state_var);
|
||||
if ((channel->state_var & L2CAP_CHANNEL_STATE_VAR_RCVD_CONF_RSP) == 0) return 0;
|
||||
if ((channel->state_var & L2CAP_CHANNEL_STATE_VAR_SENT_CONF_RSP) == 0) return 0;
|
||||
// addition check that fixes re-entrance issue causing l2cap event channel opened twice
|
||||
if (channel->state == L2CAP_STATE_OPEN) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user