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

Commit 283460c8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I5dcc7076,I38d4baed,I8e2ecb54

* changes:
  shim: Use proper types HCI_ERR_CONN_FAILED_ESTABLISHMENT
  Replace btif/src/btif_hh::memset with RawAddress::kEmpty
  Remove duplicate disconnect reason bta/gatt/::GATT_CONN_UNKNOWN
parents f86725ec 8cb731b6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1108,12 +1108,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);

+1 −1
Original line number Diff line number Diff line
@@ -432,7 +432,7 @@ void btif_hh_remove_device(RawAddress bd_addr) {
    if (p_added_dev->bd_addr == bd_addr) {
      BTA_HhRemoveDev(p_added_dev->dev_handle);
      btif_storage_remove_hid_info(p_added_dev->bd_addr);
      memset(&(p_added_dev->bd_addr), 0, 6);
      p_added_dev->bd_addr = RawAddress::kEmpty;
      p_added_dev->dev_handle = BTA_HH_INVALID_HANDLE;
      break;
    }
+1 −2
Original line number Diff line number Diff line
@@ -226,8 +226,7 @@ inline tHCI_STATUS ToLegacyHciErrorCode(const hci::ErrorCode& reason) {
    case hci::ErrorCode::CONTROLLER_BUSY:
      return static_cast<tHCI_STATUS>(hci::ErrorCode::CONTROLLER_BUSY);
    case hci::ErrorCode::CONNECTION_FAILED_ESTABLISHMENT:
      return static_cast<tHCI_STATUS>(
          hci::ErrorCode::CONNECTION_FAILED_ESTABLISHMENT);
      return HCI_ERR_CONN_FAILED_ESTABLISHMENT;
    case hci::ErrorCode::STATUS_UNKNOWN:
      return HCI_ERR_UNDEFINED;
    default:
+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;
    }
Loading