File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1152,6 +1152,7 @@ endif # BT_MESH_OP_AGG_CLI
11521152
11531153config BT_MESH_LARGE_COMP_DATA_SRV
11541154 bool "Support for Large Composition Data Server Model"
1155+ depends on BT_MESH_MODEL_EXTENSIONS
11551156 help
11561157 Enable support for the Large Composition Data Server model.
11571158
Original file line number Diff line number Diff line change @@ -170,8 +170,11 @@ const struct bt_mesh_model_op _bt_mesh_large_comp_data_srv_op[] = {
170170
171171static int large_comp_data_srv_init (const struct bt_mesh_model * model )
172172{
173- if (!bt_mesh_model_in_primary (model )) {
174- LOG_ERR ("Large Composition Data Server only allowed in primary element" );
173+ const struct bt_mesh_model * config_srv =
174+ bt_mesh_model_find (bt_mesh_model_elem (model ), BT_MESH_MODEL_ID_CFG_SRV );
175+
176+ if (config_srv == NULL ) {
177+ LOG_ERR ("Large Composition Data Server cannot extend Configuration server" );
175178 return - EINVAL ;
176179 }
177180
@@ -181,6 +184,8 @@ static int large_comp_data_srv_init(const struct bt_mesh_model *model)
181184
182185 srv .model = model ;
183186
187+ bt_mesh_model_extend (model , config_srv );
188+
184189 return 0 ;
185190}
186191
You can’t perform that action at this time.
0 commit comments