diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-03-30 16:46:36 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-03-30 16:49:54 +0300 |
commit | 5e36d4e8ed8821fe4cb8ee6849ce991aac49a23e (patch) | |
tree | f2dd8c7fa0ecd79862197000222e66f58224a716 /lib/uuid.c | |
parent | 85ffc940f7bb48c563323deff877037b14d5de4a (diff) | |
download | bluez-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.c | 3 |
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 */ |