--- src/eir.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/eir.c b/src/eir.c index 9d42917..50912a0 100644 --- a/src/eir.c +++ b/src/eir.c @@ -55,7 +55,8 @@ static void eir_parse_uuid16(struct eir_data *eir, void *data, uint8_t len) service.type = SDP_UUID16; for (i = 0; i < len / 2; i++, uuid16++) { - service.value.uuid16 = btohs(bt_get_unaligned(uuid16)); + service.value.uuid16 = bt_get_le16(uuid16); + uuid_str = bt_uuid2string(&service); eir->services = g_slist_append(eir->services, uuid_str); } @@ -70,7 +71,8 @@ static void eir_parse_uuid32(struct eir_data *eir, void *data, uint8_t len) service.type = SDP_UUID32; for (i = 0; i < len / 4; i++, uuid32++) { - service.value.uuid32 = btohl(bt_get_unaligned(uuid32)); + service.value.uuid32 = bt_get_le32(uuid32); + uuid_str = bt_uuid2string(&service); eir->services = g_slist_append(eir->services, uuid_str); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html