From 400926a1ac85127ccf6bb2bdac44425dbcebec4b Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Tue, 9 Sep 2025 09:13:27 +0200 Subject: [PATCH] fw/services/normal/bluetooth/storage: set unfaithful on add Fixes FIRM-571 Signed-off-by: Gerard Marull-Paretas --- .../normal/bluetooth/bluetooth_persistent_storage.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fw/services/normal/bluetooth/bluetooth_persistent_storage.c b/src/fw/services/normal/bluetooth/bluetooth_persistent_storage.c index d1107dcd..aa1e4123 100644 --- a/src/fw/services/normal/bluetooth/bluetooth_persistent_storage.c +++ b/src/fw/services/normal/bluetooth/bluetooth_persistent_storage.c @@ -679,6 +679,13 @@ BTBondingID bt_persistent_storage_store_ble_pairing(const SMPairingInfo *new_pai if (is_gateway && status == GapBondingFileSetUpdated) { prv_update_bondings(key, BtPersistBondingTypeBLE); } + + // In practice we only support a single BLE pairing at a time, so if we add a new one, + // set ourselves as unfaithful. + if (op == BtPersistBondingOpDidAdd) { + bt_persistent_storage_set_unfaithful(true); + } + prv_call_ble_bonding_change_handlers(key, op); return key;