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>
This commit is contained in:
parent
1a89ca1238
commit
24729bb7c6
1 changed files with 4 additions and 1 deletions
|
@ -4622,8 +4622,11 @@ static int cf_set(const char *name, size_t len_rd, settings_read_cb read_cb,
|
||||||
cfg = find_cf_cfg(NULL);
|
cfg = find_cf_cfg(NULL);
|
||||||
if (!cfg) {
|
if (!cfg) {
|
||||||
BT_ERR("Unable to restore CF: no cfg left");
|
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) {
|
if (len_rd) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue