l2cap-ertm: disconnect if ertm mandatory but configure response indicates ertm not supported here

This commit is contained in:
Matthias Ringwald 2017-07-12 11:43:46 +02:00
parent d4016dac2c
commit a32d6a0346

View File

@ -1626,6 +1626,13 @@ static void l2cap_signaling_handler_channel(l2cap_channel_t *channel, uint8_t *c
l2cap_start_ertx(channel);
break;
default:
#ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
if (channel->mode == L2CAP_CHANNEL_MODE_ENHANCED_RETRANSMISSION && channel->ertm_mandatory){
// remote does not offer ertm but it's required
channel->state = L2CAP_STATE_WILL_SEND_DISCONNECT_REQUEST;
break;
}
#endif
// retry on negative result
channelStateVarSetFlag(channel, L2CAP_CHANNEL_STATE_VAR_SEND_CONF_REQ);
break;