fw/services/normal/bluetooth/storage: set unfaithful on add

Fixes FIRM-571

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2025-09-09 09:13:27 +02:00 committed by Jinchang
parent 4051c5bb97
commit 400926a1ac
1 changed files with 7 additions and 0 deletions

View File

@ -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;