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)));
}