/* * Match provider by uuid */ int provider_match_uuid(provider_p provider, uint128_t *uuid, int count) { uint128_t puuid; int i; while (count > 0) { if (memcmp(uuid, &uuid_public_browse_group, sizeof(*uuid)) == 0) return 1; for (i = 0 ; ; i++) { if (i == provider->profile->ucount) return 0; memcpy(&puuid, &uuid_base, sizeof(puuid)); puuid.b[2] = provider->profile->uuid[i] >> 8; puuid.b[3] = provider->profile->uuid[i]; if (memcmp(uuid, &puuid, sizeof(*uuid)) == 0) break; } count--; uuid++; } return 1; }