Commit 393c5ce0 authored by Håvard Reierstad's avatar Håvard Reierstad Committed by Johan Hedberg
Browse files

bsim: Bluetooth: mesh: fix model extension



In 'test_access.c', model 3 on element 1 extending model 3 on element 0
is now registered correctly. When calling 'bt_mesh_model_extend' on
models on different elements, this needs to called from the
model with the highest element index to be registered correctly.

Signed-off-by: default avatarHåvard Reierstad <haavard.reierstad@nordicsemi.no>
parent 6e39775e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -261,8 +261,8 @@ static int model3_init(struct bt_mesh_model *model)
	ASSERT_OK(bt_mesh_model_extend(model, model - 2));
	ASSERT_OK(bt_mesh_model_extend(model, model - 1));

	if (model->elem_idx == 0) {
		ASSERT_OK(bt_mesh_model_extend(&models_ne[2], model));
	if (model->elem_idx == 1) {
		ASSERT_OK(bt_mesh_model_extend(model, &models[4]));
	}

	return 0;