OSDN Git Service

Use tBTM_STATUS in stack/l2cap/::
authorChris Manton <cmanton@google.com>
Mon, 1 Mar 2021 17:32:24 +0000 (09:32 -0800)
committerChris Manton <cmanton@google.com>
Mon, 8 Mar 2021 21:32:51 +0000 (13:32 -0800)
Toward meaningful code

Bug: 163134718
Test: cert
Tag: #refactor

Change-Id: I588780b8301474b01c2c9f52e3d9c2c1b9fdd937

stack/l2cap/l2c_ble.cc
stack/l2cap/l2c_int.h
stack/l2cap/l2c_link.cc

index 7038130..b826dc1 100644 (file)
@@ -1404,7 +1404,7 @@ void l2cble_send_peer_disc_req(tL2C_CCB* p_ccb) {
  *
  ******************************************************************************/
 void l2cble_sec_comp(const RawAddress* bda, tBT_TRANSPORT transport,
-                     void* p_ref_data, uint8_t status) {
+                     void* p_ref_data, tBTM_STATUS status) {
   const RawAddress& p_bda = *bda;
   tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bda, BT_TRANSPORT_LE);
   tL2CAP_SEC_DATA* p_buf = NULL;
index b454003..a2bcb6f 100644 (file)
@@ -737,9 +737,9 @@ extern void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid,
 extern void l2c_link_adjust_allocation(void);
 
 extern void l2c_link_sec_comp(const RawAddress* p_bda, tBT_TRANSPORT trasnport,
-                              void* p_ref_data, uint8_t status);
+                              void* p_ref_data, tBTM_STATUS status);
 extern void l2c_link_sec_comp2(const RawAddress& p_bda, tBT_TRANSPORT trasnport,
-                               void* p_ref_data, uint8_t status);
+                               void* p_ref_data, tBTM_STATUS status);
 extern void l2c_link_adjust_chnl_allocation(void);
 
 #if (L2CAP_CONFORMANCE_TESTING == TRUE)
index 5821fad..8f92aea 100644 (file)
@@ -265,21 +265,22 @@ void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle,
  ******************************************************************************/
 void l2c_link_sec_comp(const RawAddress* p_bda,
                        UNUSED_ATTR tBT_TRANSPORT transport, void* p_ref_data,
-                       uint8_t status) {
+                       tBTM_STATUS status) {
   l2c_link_sec_comp2(*p_bda, transport, p_ref_data, status);
 }
 
 void l2c_link_sec_comp2(const RawAddress& p_bda,
                         UNUSED_ATTR tBT_TRANSPORT transport, void* p_ref_data,
-                        uint8_t status) {
+                        tBTM_STATUS status) {
   tL2C_CONN_INFO ci;
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
   tL2C_CCB* p_next_ccb;
   uint8_t event;
 
-  LOG_DEBUG("status=%d, BD_ADDR=%s, transport=%d", status,
-            p_bda.ToString().c_str(), transport);
+  LOG_DEBUG("btm_status=%s, BD_ADDR=%s, transport=%s",
+            btm_status_text(status).c_str(), PRIVATE_ADDRESS(p_bda),
+            BtTransportText(transport).c_str());
 
   if (status == BTM_SUCCESS_NO_SECURITY) {
     status = BTM_SUCCESS;