l2cap: track conn request pending sent

This commit is contained in:
Matthias Ringwald 2021-09-13 15:07:43 +02:00
parent e777ec9519
commit 67d696b32a
2 changed files with 3 additions and 2 deletions

View File

@ -1487,6 +1487,7 @@ static bool l2cap_run_for_classic_channel(l2cap_channel_t * channel){
if (!hci_can_send_acl_packet_now(channel->con_handle)) return false;
if (channel->state_var & L2CAP_CHANNEL_STATE_VAR_SEND_CONN_RESP_PEND) {
channelStateVarClearFlag(channel, L2CAP_CHANNEL_STATE_VAR_SEND_CONN_RESP_PEND);
channelStateVarSetFlag(channel, L2CAP_CHANNEL_STATE_VAR_SENT_CONN_RESP_PEND);
l2cap_send_signaling_packet(channel->con_handle, CONNECTION_RESPONSE, channel->remote_sig_id, channel->local_cid, channel->remote_cid, 1, 0);
}
break;

View File

@ -110,8 +110,8 @@ typedef enum {
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_INVALID 1 << 9 // in CONF RSP, send UNKNOWN OPTIONS
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_REJECTED 1 << 10 // in CONF RSP, send Unacceptable Parameters (ERTM)
#define L2CAP_CHANNEL_STATE_VAR_BASIC_FALLBACK_TRIED 1 << 11 // set when ERTM was requested but we want only Basic mode (ERM)
#define L2CAP_CHANNEL_STATE_VAR_SEND_CMD_REJ_UNKNOWN 1 << 12 // send CMD_REJ with reason unknown
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONN_RESP_PEND 1 << 13 // send Connection Respond with pending
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONN_RESP_PEND 1 << 12 // send Connection Respond with pending
#define L2CAP_CHANNEL_STATE_VAR_SENT_CONN_RESP_PEND 1 << 13 // send CMD_REJ with reason unknown
#define L2CAP_CHANNEL_STATE_VAR_INCOMING 1 << 15 // channel is incoming