From fc679c50f90d84d691765dea22d964c4027c68ad Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 27 Sep 2017 09:55:40 +0300 Subject: [PATCH] Bluetooth: Mesh: Fix encoding health status when app has no callback The branch for handling the case when the app has not provided a callback for health faults was encoding the payload in a wrong way. Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/mesh/health.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/mesh/health.c b/subsys/bluetooth/host/mesh/health.c index 985e66ffb22..84de3904801 100644 --- a/subsys/bluetooth/host/mesh/health.c +++ b/subsys/bluetooth/host/mesh/health.c @@ -105,8 +105,8 @@ static size_t health_get_current(struct bt_mesh_model *mod, } } else { BT_WARN("No callback for getting faults"); - net_buf_simple_push_u8(msg, HEALTH_TEST_STANDARD); - net_buf_simple_push_le16(msg, 0); + sys_put_le16(0, company_ptr); + *test_id = HEALTH_TEST_STANDARD; fault_count = 0; }