p_ccb->local_cid, (p_cfg->flags & L2CAP_CFG_FLAGS_MASK_CONT));
(*p_ccb->p_rcb->api.pL2CA_ConfigInd_Cb)(p_ccb->local_cid, p_cfg);
l2c_csm_send_config_rsp_ok(p_ccb);
+ if (p_ccb->config_done & OB_CFG_DONE) {
+ (*p_ccb->p_rcb->api.pL2CA_ConfigCfm_Cb)(
+ p_ccb->local_cid, p_ccb->remote_config_rsp_result);
+ }
} else if (cfg_result == L2CAP_PEER_CFG_DISCONNECT) {
/* Disconnect if channels are incompatible */
L2CAP_TRACE_EVENT("L2CAP - incompatible configurations disconnect");
L2CAP_TRACE_API("L2CAP - Calling Config_Rsp_Cb(), CID: 0x%04x",
p_ccb->local_cid);
- (*p_ccb->p_rcb->api.pL2CA_ConfigCfm_Cb)(p_ccb->local_cid, p_cfg->result);
+ p_ccb->remote_config_rsp_result = p_cfg->result;
+ if (p_ccb->config_done & IB_CFG_DONE) {
+ (*p_ccb->p_rcb->api.pL2CA_ConfigCfm_Cb)(p_ccb->local_cid,
+ p_cfg->result);
+ }
break;
case L2CEVT_L2CAP_CONFIG_RSP_NEG: /* Peer config error rsp */
#define IB_CFG_DONE 0x01
#define OB_CFG_DONE 0x02
#define RECONFIG_FLAG 0x04 /* True after initial configuration */
-#define CFG_DONE_MASK (IB_CFG_DONE | OB_CFG_DONE)
uint8_t config_done; /* Configuration flag word */
+ uint16_t remote_config_rsp_result; /* The config rsp result from remote */
uint8_t local_id; /* Transaction ID for local trans */
uint8_t remote_id; /* Transaction ID for local */