summaryrefslogtreecommitdiff
path: root/lib/uuid.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-03-30 16:46:36 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-03-30 16:49:54 +0300
commit5e36d4e8ed8821fe4cb8ee6849ce991aac49a23e (patch)
treef2dd8c7fa0ecd79862197000222e66f58224a716 /lib/uuid.c
parent85ffc940f7bb48c563323deff877037b14d5de4a (diff)
downloadbluez-5e36d4e8ed8821fe4cb8ee6849ce991aac49a23e.tar.gz
lib/uuid: Fix bt_uuid_to_le
bt_uuid_to_le is currently broken if the src uuid is type 32 bits since it does the conversion to 128 bits but still uses the original value to swap instead of the coverted one.
Diffstat (limited to 'lib/uuid.c')
-rw-r--r--lib/uuid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/uuid.c b/lib/uuid.c
index 4f34b17f4..fd6196806 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -301,7 +301,8 @@ int bt_uuid_to_le(const bt_uuid_t *src, void *dst)
bt_put_le16(src->value.u16, dst);
return 0;
case BT_UUID32:
- bt_uuid_to_uuid128(src, &uuid);
+ bt_uuid32_to_uuid128(src, &uuid);
+ src = &uuid;
/* Fallthrough */
case BT_UUID128:
/* Convert from 128-bit BE to LE */