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

Commit 879f9a6f authored by weichinweng's avatar weichinweng
Browse files

Use p_acl->remote_addr to do BTA_dm_acl_down

Use p_acl->remote_addr to do BTA_dm_acl_down, not p_acl->conn_addr.

Bug: 171669750
Tag: #feature
Test: compile & forget BLE/Hearingaids device while connected.
Change-Id: Ie44e818c4bc176df5426996a06a99536c5250077
parent 865f9def
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -396,17 +396,12 @@ void btm_acl_removed(uint16_t handle) {
    LOG_WARN("Unable to find active acl");
    return;
  }
  RawAddress bda = p_acl->remote_addr;
  tBT_TRANSPORT transport = p_acl->transport;
  if (transport == BT_TRANSPORT_LE) {
    bda = p_acl->conn_addr;
  }
  p_acl->in_use = false;

  /* Only notify if link up has had a chance to be issued */
  if (p_acl->link_up_issued) {
    p_acl->link_up_issued = false;
    BTA_dm_acl_down(bda, transport);
    BTA_dm_acl_down(p_acl->remote_addr, p_acl->transport);
  }

  memset(p_acl, 0, sizeof(tACL_CONN));