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

Commit 2815f4df authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

gatt: Fix direct connect

This fix regression after
cae44b5d Add support to connect LE Gatt with address type (2/2)

Gatt shall always check the security record of the device and make sure
that when adding device to allow list, we use identity address if it is
known.

Bug: 278199753
Test: manual
Tag: #feature
Change-Id: I3f6cb30b6b90dd379a5ce6fd7c793e003324d24e
parent 3223ab21
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -2801,11 +2801,13 @@ bool acl_create_le_connection_with_id(uint8_t id, const RawAddress& bd_addr,
      .bda = bd_addr,
      .type = addr_type,
  };
  if (address_with_type.type == BLE_ADDR_PUBLIC) {

  gatt_find_in_device_record(bd_addr, &address_with_type);
  }
  LOG_DEBUG("Creating le direct connection to:%s",
            ADDRESS_TO_LOGGABLE_CSTR(address_with_type));

  LOG_DEBUG("Creating le direct connection to:%s type:%s (initial type: %s)",
            ADDRESS_TO_LOGGABLE_CSTR(address_with_type),
            AddressTypeText(address_with_type.type).c_str(),
            AddressTypeText(addr_type).c_str());

  if (address_with_type.type == BLE_ADDR_ANONYMOUS) {
    LOG_WARN(