Skip to content

Commit d68d799

Browse files
Johan HedbergAnas Nashif
authored andcommitted
Bluetooth: Mesh: Don't send health status messages if a test fails
The test failure may be e.g. because of an unknown company id, and in that case the spec expects us to ignore the message. With this patch it should be possible to pass MESH/SR/HM/RFS/BI-01-C. Signed-off-by: Johan Hedberg <[email protected]>
1 parent bda5733 commit d68d799

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

subsys/bluetooth/host/mesh/health.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,13 @@ static void health_fault_test(struct bt_mesh_model *model,
216216
BT_DBG("test 0x%02x company 0x%04x", test_id, company_id);
217217

218218
if (srv->fault_test) {
219-
srv->fault_test(model, test_id, company_id);
219+
int err;
220+
221+
err = srv->fault_test(model, test_id, company_id);
222+
if (err) {
223+
BT_WARN("Running fault test failed with err %d", err);
224+
return;
225+
}
220226
}
221227

222228
health_get_registered(model, company_id, msg);

0 commit comments

Comments
 (0)