From 6bc5ba166ac2fe33d1f7972e392f93371647ea59 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 19 Dec 2012 16:40:32 +0200 Subject: [PATCH] core: Fix treating uuid_any as an invalid UUID --- src/mgmt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mgmt.c b/src/mgmt.c index ea1d2f3a6..d2d5da3e0 100644 --- a/src/mgmt.c +++ b/src/mgmt.c @@ -942,8 +942,14 @@ static void uuid_to_uuid128(uuid_t *uuid128, const uuid_t *uuid) static bool is_16bit_uuid(const uuid_t *uuid) { + static uint8_t any[16] = { 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 }; uuid_t tmp; + if (uuid->type == SDP_UUID128 && + memcmp(&uuid->value.uuid128, any, sizeof(any)) == 0) + return true; + uuid_to_uuid128(&tmp, uuid); if (!sdp_uuid128_to_uuid(&tmp)) -- 2.47.3