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 <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-09-27 09:55:40 +03:00 committed by Johan Hedberg
parent 6b966e4b96
commit fc679c50f9

View file

@ -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;
}