summaryrefslogtreecommitdiff
path: root/lib/uuid.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-09-04 16:35:46 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-09-06 20:08:09 +0300
commite39be1cb2df3a383f110759b284083d5d17167a3 (patch)
treed6b91fb86137a190c37052e0f2e9bb27fd3cdbab /lib/uuid.c
parent2a2997feb82256770604e187b5f66bb10a22d8ee (diff)
downloadbluez-e39be1cb2df3a383f110759b284083d5d17167a3.tar.gz
lib/uuid: Fix bt_uuid_strcmp
bt_uuid_strcmp shall first convert the strings to bt_uuid_t using bt_string_to_uuid since bt_uuid_to_string can produce different formats depending on the type.
Diffstat (limited to 'lib/uuid.c')
-rw-r--r--lib/uuid.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/uuid.c b/lib/uuid.c
index fd6196806..046b52131 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -289,7 +289,12 @@ int bt_string_to_uuid(bt_uuid_t *uuid, const char *string)
int bt_uuid_strcmp(const void *a, const void *b)
{
- return strcasecmp(a, b);
+ bt_uuid_t u1, u2;
+
+ bt_string_to_uuid(&u1, a);
+ bt_string_to_uuid(&u2, b);
+
+ return bt_uuid_cmp(&u1, &u2);
}
int bt_uuid_to_le(const bt_uuid_t *src, void *dst)