mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
rfcomm: finalize multiplexer on l2cap disconnect in any state
This commit is contained in:
parent
a16832cfee
commit
7d20d6a437
@ -1027,19 +1027,8 @@ static int rfcomm_hci_event_handler(uint8_t *packet, uint16_t size){
|
||||
log_info("L2CAP_EVENT_CHANNEL_CLOSED cid 0x%0x, mult %p", l2cap_cid, multiplexer);
|
||||
if (!multiplexer) break;
|
||||
log_info("L2CAP_EVENT_CHANNEL_CLOSED state %u", multiplexer->state);
|
||||
switch (multiplexer->state) {
|
||||
case RFCOMM_MULTIPLEXER_W4_CONNECT:
|
||||
case RFCOMM_MULTIPLEXER_SEND_SABM_0:
|
||||
case RFCOMM_MULTIPLEXER_W4_SABM_0:
|
||||
case RFCOMM_MULTIPLEXER_SEND_UA_0:
|
||||
case RFCOMM_MULTIPLEXER_W4_UA_0:
|
||||
case RFCOMM_MULTIPLEXER_OPEN:
|
||||
// don't call l2cap_disconnect as it's alreay closed
|
||||
rfcomm_multiplexer_finalize(multiplexer);
|
||||
return 1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// no need to call l2cap_disconnect here, as it's already closed
|
||||
rfcomm_multiplexer_finalize(multiplexer);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user