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:
François Delawarde 2020-05-22 09:27:47 +02:00 committed by Carles Cufí
commit 24729bb7c6

View file

@ -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) {