Bluetooth: mesh: Change cfg_cli buffer length check
Changed buffer length check in bt_mesh_comp_p1_elem_pull. The previous threshold would result in the method not detecting the final element when it consisted of just one model. Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
This commit is contained in:
parent
955d85aa67
commit
ea753eb52a
1 changed files with 1 additions and 1 deletions
|
@ -2320,7 +2320,7 @@ struct bt_mesh_mod_id_vnd bt_mesh_comp_p0_elem_mod_vnd(struct bt_mesh_comp_p0_el
|
||||||
struct bt_mesh_comp_p1_elem *bt_mesh_comp_p1_elem_pull(struct net_buf_simple *buf,
|
struct bt_mesh_comp_p1_elem *bt_mesh_comp_p1_elem_pull(struct net_buf_simple *buf,
|
||||||
struct bt_mesh_comp_p1_elem *elem)
|
struct bt_mesh_comp_p1_elem *elem)
|
||||||
{
|
{
|
||||||
if (buf->len < 6) {
|
if (buf->len < 4) {
|
||||||
LOG_DBG("No more elements to pull or missing data");
|
LOG_DBG("No more elements to pull or missing data");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue