summaryrefslogtreecommitdiff
path: root/attrib/gatt.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2014-03-24 16:25:36 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2014-03-24 22:08:02 +0200
commit3f03ab5766de008f008fdd7cfb8679849accc51f (patch)
tree96059836c66a64c40bf15b0eabc2cb53391a0069 /attrib/gatt.c
parent0461b9d99c896657bb0265ae2b97af5221e48259 (diff)
downloadbluez-3f03ab5766de008f008fdd7cfb8679849accc51f.tar.gz
Replace att_get_uuid16() by get_le16()
Diffstat (limited to 'attrib/gatt.c')
-rw-r--r--attrib/gatt.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/attrib/gatt.c b/attrib/gatt.c
index 9c6dee187..0d439136b 100644
--- a/attrib/gatt.c
+++ b/attrib/gatt.c
@@ -246,7 +246,9 @@ static void primary_all_cb(guint8 status, const guint8 *ipdu, guint16 iplen,
end = att_get_u16(&data[2]);
if (list->len == 6) {
- bt_uuid_t uuid16 = att_get_uuid16(&data[4]);
+ bt_uuid_t uuid16;
+
+ bt_uuid16_create(&uuid16, get_le16(&data[4]));
bt_uuid_to_uuid128(&uuid16, &uuid);
} else if (list->len == 20) {
uuid = att_get_uuid128(&data[4]);
@@ -385,8 +387,9 @@ static struct gatt_included *included_from_buf(const uint8_t *buf, gsize len)
if (len == 8) {
bt_uuid_t uuid128;
- bt_uuid_t uuid16 = att_get_uuid16(&buf[6]);
+ bt_uuid_t uuid16;
+ bt_uuid16_create(&uuid16, get_le16(&buf[6]));
bt_uuid_to_uuid128(&uuid16, &uuid128);
bt_uuid_to_string(&uuid128, incl->uuid, sizeof(incl->uuid));
}
@@ -505,7 +508,9 @@ static void char_discovered_cb(guint8 status, const guint8 *ipdu, guint16 iplen,
last = att_get_u16(value);
if (list->len == 7) {
- bt_uuid_t uuid16 = att_get_uuid16(&value[5]);
+ bt_uuid_t uuid16;
+
+ bt_uuid16_create(&uuid16, get_le16(&value[5]));
bt_uuid_to_uuid128(&uuid16, &uuid);
} else
uuid = att_get_uuid128(&value[5]);