Skip to content

Commit

Permalink
bluetooth: host: fix wrong bt/cf settings loading
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
François Delawarde authored and jhedberg committed May 27, 2020
1 parent a520506 commit 137ebbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion subsys/bluetooth/host/gatt.c
Original file line number Diff line number Diff line change
Expand Up @@ -4303,8 +4303,11 @@ static int cf_set(const char *name, size_t len_rd, settings_read_cb read_cb,
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) {
Expand Down

0 comments on commit 137ebbc

Please sign in to comment.