Fix an incorect behavior, when converting optional services.

This commit is contained in:
zakorgyula 2016-06-06 10:11:29 +02:00
parent 1bc94c132e
commit 0d7943765a

View file

@ -125,10 +125,9 @@ fn convert_request_device_options(options: &RequestDeviceOptions,
if let Some(ref opt_services) = options.optionalServices {
for opt_service in opt_services {
let uuid = try!(BluetoothUUID::GetService(global, opt_service.clone())).to_string();
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
return Err(Security)
if !uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
optional_services.push(uuid);
}
optional_services.push(uuid);
}
}