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

Commit d61781e8 authored by Chris Manton's avatar Chris Manton
Browse files

Remove duplicate disconnect reason bta/gatt/::GATT_CONN_UNKNOWN

Bug: 163134718
Test: gd/cert/run
Tag: #refactor

Change-Id: I8e2ecb54776083a3e558fd5397a477e59870d6d5
parent a020bbfe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1100,12 +1100,12 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, const RawAddress& bdaddr,
    LOG_INFO("Connected att_id:%hhu transport:%s reason:%s", gattc_if,
             bt_transport_text(transport).c_str(),
             gatt_disconnection_reason_text(reason).c_str());
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_CONNECTED, GATT_CONN_UNKNOWN);
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_CONNECTED, GATT_CONN_OK);
  } else {
    LOG_INFO("Disconnected att_id:%hhu transport:%s reason:%s", gattc_if,
             bt_transport_text(transport).c_str(),
             gatt_disconnection_reason_text(reason).c_str());
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, GATT_CONN_UNKNOWN);
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, GATT_CONN_OK);
  }

  tBTA_GATTC_DATA* p_buf =
+2 −2
Original line number Diff line number Diff line
@@ -593,9 +593,9 @@ static void bta_gatts_conn_cback(tGATT_IF gatt_if, const RawAddress& bdaddr,
          << ", conn_id=" << loghex(conn_id) << " connected=" << connected;

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

  p_reg = bta_gatts_find_app_rcb_by_app_if(gatt_if);

+2 −2
Original line number Diff line number Diff line
@@ -1124,8 +1124,8 @@ void GATT_StartIf(tGATT_IF gatt_if) {
      p_tcb = gatt_find_tcb_by_addr(bda, transport);
      if (p_reg->app_cb.p_conn_cb && p_tcb) {
        conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);
        (*p_reg->app_cb.p_conn_cb)(gatt_if, bda, conn_id, true,
                                   GATT_CONN_UNKNOWN, transport);
        (*p_reg->app_cb.p_conn_cb)(gatt_if, bda, conn_id, true, GATT_CONN_OK,
                                   transport);
      }
      start_idx = ++found_idx;
    }
+0 −1
Original line number Diff line number Diff line
@@ -196,7 +196,6 @@ inline std::string gatt_op_code_text(const tGATT_OP_CODE& op_code) {

typedef enum : uint16_t {
  GATT_CONN_OK = 0,
  GATT_CONN_UNKNOWN = 0,
  /* general L2cap failure  */
  GATT_CONN_L2C_FAILURE = 1,
  /* 0x08 connection timeout  */