mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Fix an incorect behavior, when converting optional services.
This commit is contained in:
parent
1bc94c132e
commit
0d7943765a
1 changed files with 2 additions and 3 deletions
|
@ -125,12 +125,11 @@ fn convert_request_device_options(options: &RequestDeviceOptions,
|
||||||
if let Some(ref opt_services) = options.optionalServices {
|
if let Some(ref opt_services) = options.optionalServices {
|
||||||
for opt_service in opt_services {
|
for opt_service in opt_services {
|
||||||
let uuid = try!(BluetoothUUID::GetService(global, opt_service.clone())).to_string();
|
let uuid = try!(BluetoothUUID::GetService(global, opt_service.clone())).to_string();
|
||||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
if !uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||||
return Err(Security)
|
|
||||||
}
|
|
||||||
optional_services.push(uuid);
|
optional_services.push(uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Ok(RequestDeviceoptions::new(BluetoothScanfilterSequence::new(filters),
|
Ok(RequestDeviceoptions::new(BluetoothScanfilterSequence::new(filters),
|
||||||
ServiceUUIDSequence::new(optional_services)))
|
ServiceUUIDSequence::new(optional_services)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue