bluetooth: host: fix wrong bt/cf settings loading
This commits fixes the loading of bt/cf settings into memory. Only data
was loaded and not the address.
Signed-off-by: François Delawarde <fnde@demant.com>
diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c
index 276fe33..02b3c47 100644
--- a/subsys/bluetooth/host/gatt.c
+++ b/subsys/bluetooth/host/gatt.c
@@ -4303,8 +4303,11 @@
cfg = find_cf_cfg(NULL);
if (!cfg) {
BT_ERR("Unable to restore CF: no cfg left");
- return 0;
+ return -ENOMEM;
}
+
+ cfg->id = id;
+ bt_addr_le_copy(&cfg->peer, &addr);
}
if (len_rd) {