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

Commit c49f1130 authored by Thomas Girardier's avatar Thomas Girardier Committed by Gerrit Code Review
Browse files

Merge "Fix reset other bonding device's state"

parents d90bc4f9 0f964b22
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 ||