Skip to content

Commit 137ebbc

Browse files
François Delawardejhedberg
authored andcommitted
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 <[email protected]>
1 parent a520506 commit 137ebbc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

subsys/bluetooth/host/gatt.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4303,8 +4303,11 @@ static int cf_set(const char *name, size_t len_rd, settings_read_cb read_cb,
43034303
cfg = find_cf_cfg(NULL);
43044304
if (!cfg) {
43054305
BT_ERR("Unable to restore CF: no cfg left");
4306-
return 0;
4306+
return -ENOMEM;
43074307
}
4308+
4309+
cfg->id = id;
4310+
bt_addr_le_copy(&cfg->peer, &addr);
43084311
}
43094312

43104313
if (len_rd) {

0 commit comments

Comments
 (0)