OSDN Git Service

SDP: FCR mode is checked in L2cap layer
authorHansong Zhang <hsz@google.com>
Thu, 24 Sep 2020 00:35:10 +0000 (17:35 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 24 Sep 2020 02:14:16 +0000 (19:14 -0700)
In l2c_fcr_process_peer_cfg_req.

L2cap layer sends config response for you.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I841c8f23c15004cd6aade3b2ce8803cf4dd88909

stack/sdp/sdp_main.cc

index 4f596ed..5df9c64 100644 (file)
@@ -229,19 +229,6 @@ static void sdp_config_ind(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg) {
   p_cfg->mtu_present = false;
   p_cfg->result = L2CAP_CFG_OK;
 
-  /* Check peer config request against our rfcomm configuration */
-  if (p_cfg->fcr_present && p_cfg->fcr.mode != L2CAP_FCR_BASIC_MODE) {
-    /* Reject if locally we want basic and they don't */
-    p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE;
-    p_cfg->result = L2CAP_CFG_UNACCEPTABLE_PARAMS;
-    SDP_TRACE_DEBUG(
-        "sdp_config_ind(CONFIG) -> Please try again with BASIC mode");
-    /* Remain in configure state and give the peer our desired configuration
-     */
-    L2CA_ConfigRsp(l2cap_cid, p_cfg);
-    return;
-  }
-
   L2CA_ConfigRsp(l2cap_cid, p_cfg);
 
   SDP_TRACE_EVENT("SDP - Rcvd cfg ind, sent cfg cfm, CID: 0x%x", l2cap_cid);