Bluetooth: Mesh: Cfg: Only update friend state if supported
If Friend support is not available we should not modify the value of cfg->frnd. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
ab84517b45
commit
a6ce33d7ea
1 changed files with 3 additions and 1 deletions
|
@ -2473,7 +2473,9 @@ static void friend_set(struct bt_mesh_model *model,
|
|||
goto send_status;
|
||||
}
|
||||
|
||||
cfg->frnd = buf->data[0];
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
|
||||
cfg->frnd = buf->data[0];
|
||||
}
|
||||
|
||||
sub = bt_mesh_subnet_get(cfg->hb_pub.net_idx);
|
||||
if ((cfg->hb_pub.feat & BT_MESH_FEAT_FRIEND) && sub) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue