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

Commit 30d6d273 authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "Use proper resolved address upon connection fail or timeout" into tm-d1-dev am: 00df6670

parents dcdfd9db 00df6670
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -147,8 +147,15 @@ void acl_ble_connection_fail(const tBLE_BD_ADDR& address_with_type,
  if (status != HCI_ERR_ADVERTISING_TIMEOUT) {
    btm_cb.ble_ctr_cb.set_connection_state_idle();
    btm_ble_clear_topology_mask(BTM_BLE_STATE_INIT_BIT);
    tBLE_BD_ADDR resolved_address_with_type;
    maybe_resolve_received_address(address_with_type,
                                   &resolved_address_with_type);
    connection_manager::on_connection_timed_out_from_shim(
        address_with_type.bda);
        resolved_address_with_type.bda);
    LOG_WARN("LE connection fail peer:%s bd_addr:%s hci_status:%s",
             PRIVATE_ADDRESS(address_with_type),
             PRIVATE_ADDRESS(resolved_address_with_type.bda),
             hci_status_code_text(status).c_str());
  } else {
    btm_cb.ble_ctr_cb.inq_var.adv_mode = BTM_BLE_ADV_DISABLE;
  }
+7 −1
Original line number Diff line number Diff line
@@ -1576,7 +1576,13 @@ void gatt_cleanup_upon_disc(const RawAddress& bda, tGATT_DISCONN_REASON reason,
  VLOG(1) << __func__;

  tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(bda, transport);
  if (!p_tcb) return;
  if (!p_tcb) {
    LOG_ERROR(
        "Disconnect for unknown connection bd_addr:%s reason:%s transport:%s",
        PRIVATE_ADDRESS(bda), gatt_disconnection_reason_text(reason).c_str(),
        bt_transport_text(transport).c_str());
    return;
  }

  gatt_set_ch_state(p_tcb, GATT_CH_CLOSE);
  for (uint8_t i = 0; i < GATT_CL_MAX_LCB; i++) {