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

Commit 72682203 authored by Thomas Girardier's avatar Thomas Girardier Committed by Automerger Merge Worker
Browse files

Merge "Fix reset other bonding device's state" am: c49f1130

parents 5bd7e49a c49f1130
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -589,6 +589,13 @@ static void bond_state_changed(bt_status_t status, const RawAddress& bd_addr,
    dev_type = BT_DEVICE_TYPE_BREDR;
  }

  if ((state == BT_BOND_STATE_NONE) && (pairing_cb.bd_addr != bd_addr)
      && is_bonding_or_sdp()) {
    LOG_WARN("Ignoring bond state changed for unexpected device: %s pairing: %s",
        ADDRESS_TO_LOGGABLE_CSTR(bd_addr), ADDRESS_TO_LOGGABLE_CSTR(pairing_cb.bd_addr));
    return;
  }

  if (state == BT_BOND_STATE_BONDING ||
      (state == BT_BOND_STATE_BONDED &&
       (pairing_cb.sdp_attempts > 0 ||