Deleted Added
full compact
29c29
< * $FreeBSD: head/usr.sbin/bluetooth/sdpd/ssar.c 124758 2004-01-20 20:48:26Z emax $
---
> * $FreeBSD: head/usr.sbin/bluetooth/sdpd/ssar.c 139721 2005-01-05 18:37:37Z emax $
38a39
> #include "uuid-private.h"
61c62,63
< int32_t type, rsp_limit, ssplen, aidlen, cslen, cs, uuid;
---
> int32_t type, rsp_limit, ssplen, aidlen, cslen, cs;
> uint128_t uuid, puuid;
180c182,184
< SDP_GET16(uuid, sspptr);
---
> memcpy(&uuid, &uuid_base, sizeof(uuid));
> uuid.b[2] = *sspptr ++;
> uuid.b[3] = *sspptr ++;
184,185c188,208
< case SDP_DATA_UUID32: /* XXX FIXME */
< case SDP_DATA_UUID128: /* XXX FIXME */
---
> case SDP_DATA_UUID32:
> if (ssplen < 4)
> return (SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX);
>
> memcpy(&uuid, &uuid_base, sizeof(uuid));
> uuid.b[0] = *sspptr ++;
> uuid.b[1] = *sspptr ++;
> uuid.b[2] = *sspptr ++;
> uuid.b[3] = *sspptr ++;
> ssplen -= 4;
> break;
>
> case SDP_DATA_UUID128:
> if (ssplen < 16)
> return (SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX);
>
> memcpy(uuid.b, sspptr, 16);
> sspptr += 16;
> ssplen -= 16;
> break;
>
197,198c220,225
< if (provider->profile->uuid != uuid &&
< SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP != uuid)
---
> memcpy(&puuid, &uuid_base, sizeof(puuid));
> puuid.b[2] = provider->profile->uuid >> 8;
> puuid.b[3] = provider->profile->uuid;
>
> if (memcmp(&uuid, &puuid, sizeof(uuid)) != 0 &&
> memcmp(&uuid, &uuid_public_browse_group, sizeof(uuid)) != 0)