From c5b270e7b0033f20e594fd18f2ac0ea26a16f687 Mon Sep 17 00:00:00 2001 From: Fredrik Danebjer Date: Wed, 14 Dec 2022 09:43:32 +0100 Subject: [PATCH] Bluetooth: GATT: Fix missing endianess conversion on include end-handle Added missing conversion to CPU endianess for the include service end-handle. Signed-off-by: Fredrik Danebjer --- subsys/bluetooth/host/gatt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c index d03e7af4f32..d3d0e7db6d1 100644 --- a/subsys/bluetooth/host/gatt.c +++ b/subsys/bluetooth/host/gatt.c @@ -1609,7 +1609,7 @@ static uint8_t get_service_handles(const struct bt_gatt_attr *attr, return BT_GATT_ITER_STOP; } - include->end_handle = handle; + include->end_handle = sys_cpu_to_le16(handle); return BT_GATT_ITER_CONTINUE; }