ble_mesh: Typo in condition in comp_add_elem of cfg_srv [Zephyr]
Vendor model IDs take up four (not two) bytes in the composition
This commit is contained in:
parent
7ea60199a6
commit
91fff8c897
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ static int comp_add_elem(struct net_buf_simple *buf, struct bt_mesh_elem *elem,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (net_buf_simple_tailroom(buf) <
|
if (net_buf_simple_tailroom(buf) <
|
||||||
4 + (elem->model_count * 2U) + (elem->vnd_model_count * 2U)) {
|
4 + (elem->model_count * 2U) + (elem->vnd_model_count * 4U)) {
|
||||||
BT_ERR("%s, Too large device composition", __func__);
|
BT_ERR("%s, Too large device composition", __func__);
|
||||||
return -E2BIG;
|
return -E2BIG;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue