mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-25 18:35:17 +00:00
rfcomm: don't send rfcomm channel open failed on remote disconnect
This commit is contained in:
parent
1193857ef4
commit
67a687294c
@ -768,10 +768,16 @@ static void rfcomm_multiplexer_finalize(rfcomm_multiplexer_t * multiplexer){
|
|||||||
rfcomm_channel_t * channel = (rfcomm_channel_t *) it->next;
|
rfcomm_channel_t * channel = (rfcomm_channel_t *) it->next;
|
||||||
if (channel->multiplexer == multiplexer) {
|
if (channel->multiplexer == multiplexer) {
|
||||||
// emit appropriate events
|
// emit appropriate events
|
||||||
if (channel->state == RFCOMM_CHANNEL_OPEN) {
|
switch(channel->state){
|
||||||
rfcomm_emit_channel_closed(channel);
|
case RFCOMM_CHANNEL_OPEN:
|
||||||
} else {
|
rfcomm_emit_channel_closed(channel);
|
||||||
rfcomm_emit_channel_opened(channel, RFCOMM_MULTIPLEXER_STOPPED);
|
break;
|
||||||
|
case RFCOMM_CHANNEL_SEND_UA_AFTER_DISC:
|
||||||
|
// remote didn't wait until we send the UA disc
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rfcomm_emit_channel_opened(channel, RFCOMM_MULTIPLEXER_STOPPED);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// remove from list
|
// remove from list
|
||||||
it->next = it->next->next;
|
it->next = it->next->next;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user