Remove not allowed services when calling getPrimaryServices.

This commit is contained in:
zakorgyula 2016-10-07 13:10:17 +02:00
parent baa024e362
commit 0eeb56b549
3 changed files with 3 additions and 8 deletions

View file

@ -681,6 +681,9 @@ impl BluetoothManager {
}
}
}
services_vec.retain(|s| self.allowed_services
.get(&device_id)
.map_or(false, |uuids| uuids.contains(&s.uuid)));
if services_vec.is_empty() {
return drop(sender.send(Err(BluetoothError::NotFound)));
}

View file

@ -1,4 +0,0 @@
[blacklisted-services.html]
type: testharness
[Request for services. Does not return blacklisted service.]
expected: FAIL

View file

@ -1,4 +0,0 @@
[no-permission-present-service.html]
type: testharness
[Request for present service without permission. Reject with NotFoundError.]
expected: FAIL