Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc28ce3f authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Removed unused fixed channel disconnect reason

For debugging, if you want to know the disconnect reason, you can use
btsnoop log as the source of truth.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4c6c1cc39acc3fc0c591d2fd30b24ae223efef81
parent e9714168
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1033,7 +1033,7 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, const RawAddress& bdaddr,
    LOG_INFO("Disconnected att_id:%hhu transport:%s reason:%s", gattc_if,
             BtTransportText(transport).c_str(),
             hci_error_code_text(reason).c_str());
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, reason);
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, GATT_CONN_UNKNOWN);
  }

  tBTA_GATTC_DATA* p_buf =
+2 −4
Original line number Diff line number Diff line
@@ -593,13 +593,12 @@ static void bta_gatts_conn_cback(tGATT_IF gatt_if, const RawAddress& bdaddr,
  tBTA_GATTS_RCB* p_reg;

  VLOG(1) << __func__ << "  bda=" << bdaddr << " gatt_if= " << gatt_if
          << ", conn_id=" << loghex(conn_id) << " connected=" << connected
          << ", reason=" << loghex(reason);
          << ", conn_id=" << loghex(conn_id) << " connected=" << connected;

  if (connected)
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_CONNECTED, GATT_CONN_UNKNOWN);
  else
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, reason);
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, GATT_CONN_UNKNOWN);

  p_reg = bta_gatts_find_app_rcb_by_app_if(gatt_if);

@@ -614,7 +613,6 @@ static void bta_gatts_conn_cback(tGATT_IF gatt_if, const RawAddress& bdaddr,

    cb_data.conn.conn_id = conn_id;
    cb_data.conn.server_if = gatt_if;
    cb_data.conn.reason = reason;
    cb_data.conn.transport = transport;
    cb_data.conn.remote_bda = bdaddr;
    (*p_reg->p_cback)(evt, &cb_data);
+0 −1
Original line number Diff line number Diff line
@@ -352,7 +352,6 @@ typedef struct {
  tGATT_IF server_if;
  RawAddress remote_bda;
  uint16_t conn_id;
  tBTA_GATT_REASON reason; /* report disconnect reason */
  tBT_TRANSPORT transport;
} tBTA_GATTS_CONN;

+1 −1
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ static void gatt_connect_cback(UNUSED_ATTR tGATT_IF gatt_if,
                               bool connected, tGATT_DISCONN_REASON reason,
                               tBT_TRANSPORT transport) {
  VLOG(1) << __func__ << ": from " << bda << " connected: " << connected
          << ", conn_id: " << loghex(conn_id) << "reason: " << loghex(reason);
          << ", conn_id: " << loghex(conn_id);

  tGATT_PROFILE_CLCB* p_clcb =
      gatt_profile_find_clcb_by_bd_addr(bda, transport);
+0 −1
Original line number Diff line number Diff line
@@ -223,7 +223,6 @@ typedef union {
  uint8_t* p_data; /* uint8_t type data pointer */
  tSMP_KEY key;
  uint8_t status;
  uint16_t reason;
  uint32_t passkey;
  tSMP_OOB_DATA_TYPE req_oob_type;
} tSMP_INT_DATA;
Loading