From 91fff8c8974936d89ced693af80449d60e8e41cd Mon Sep 17 00:00:00 2001 From: lly Date: Thu, 26 Mar 2020 09:16:26 +0800 Subject: [PATCH] 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 --- components/bt/esp_ble_mesh/mesh_core/cfg_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/mesh_core/cfg_srv.c b/components/bt/esp_ble_mesh/mesh_core/cfg_srv.c index 6243de12ae..1ca16ea654 100644 --- a/components/bt/esp_ble_mesh/mesh_core/cfg_srv.c +++ b/components/bt/esp_ble_mesh/mesh_core/cfg_srv.c @@ -49,7 +49,7 @@ static int comp_add_elem(struct net_buf_simple *buf, struct bt_mesh_elem *elem, int i; 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__); return -E2BIG; }