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

Commit 6889869c authored by Sarvesh's avatar Sarvesh Committed by Sarvesh Kalwit
Browse files

[floss] Fix garbage disconnecting state metric

Previously, an incorrect variable was used to provide the address of a
disconnecting peripheral, producing a garbage value for the
peripheral's address.

This change uses the correct variable to fetch the actual address of a
disconnecting peripheral.

Bug:264969525
Test: Ensure disconnecting state address is correct when turning off \
a Bluetooth connected peripheral

Change-Id: I7e80d637c69f8ae838ebef4db6f0d4936e210085
parent 06829ebd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -866,10 +866,10 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) {
    case BTA_HH_CLOSE_EVT:
      BTIF_TRACE_DEBUG("BTA_HH_CLOSE_EVT: status = %d, handle = %d",
                       p_data->dev_status.status, p_data->dev_status.handle);
      HAL_CBACK(bt_hh_callbacks, connection_state_cb,
                (RawAddress*)&p_data->conn.bda, BTHH_CONN_STATE_DISCONNECTING);
      p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
      if (p_dev != NULL) {
        HAL_CBACK(bt_hh_callbacks, connection_state_cb, &(p_dev->bd_addr),
                  BTHH_CONN_STATE_DISCONNECTING);
        BTIF_TRACE_DEBUG("%s: uhid fd=%d local_vup=%d", __func__, p_dev->fd,
                         p_dev->local_vup);
        btif_hh_stop_vup_timer(&(p_dev->bd_addr));