mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
bluez5: don't create device if there is no connected profile
This commit is contained in:
parent
f99eefeb4f
commit
cd78003e66
1 changed files with 2 additions and 3 deletions
|
|
@ -476,7 +476,7 @@ static int device_add(struct spa_bt_monitor *monitor, struct spa_bt_device *devi
|
|||
struct spa_dict_item items[20];
|
||||
uint32_t n_items = 0;
|
||||
|
||||
if (device->added)
|
||||
if (device->connected_profiles == 0 || device->added)
|
||||
return 0;
|
||||
|
||||
info = SPA_DEVICE_OBJECT_INFO_INIT();
|
||||
|
|
@ -601,8 +601,7 @@ int spa_bt_device_check_profiles(struct spa_bt_device *device, bool force)
|
|||
device_stop_timer(device);
|
||||
device_remove(monitor, device);
|
||||
}
|
||||
}
|
||||
else if (force || (device->profiles & connected_profiles) == device->profiles) {
|
||||
} else if (force || (device->profiles & connected_profiles) == device->profiles) {
|
||||
device_stop_timer(device);
|
||||
device_add(monitor, device);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue