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

Commit 65f03b31 authored by Omair Kamil's avatar Omair Kamil
Browse files

gatt_api: Do not attempt to connect to an empty address.

Bug: 328841002
Fix: 328841002
Test: atest BumbleBluetoothTests
Flag: EXEMPT - trivial check and convergence code
Change-Id: Ida80d9dff8366143a11ee511ce841897b285ab8a
parent 2e1a1d7a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1468,6 +1468,11 @@ bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr, tBLE_ADDR_TYPE ad
    return false;
  }

  if (bd_addr == RawAddress::kEmpty) {
    log::error("Unsupported empty address, gatt_if={}", gatt_if);
    return false;
  }

  if (opportunistic) {
    log::info("Registered for opportunistic connection gatt_if={}", gatt_if);
    return true;