mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Remove not allowed services when calling getPrimaryServices.
This commit is contained in:
parent
baa024e362
commit
0eeb56b549
3 changed files with 3 additions and 8 deletions
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue