mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
bluez5: avoid asserting when device existed
When a device as added in dbus but we already knew about the device, don't assert but reuse the device we already have. Seems to happen when resuming from suspend. See rhbz#1948776
This commit is contained in:
parent
5a6967858e
commit
aabf879bb0
1 changed files with 7 additions and 6 deletions
|
|
@ -3148,13 +3148,14 @@ static void interface_added(struct spa_bt_monitor *monitor,
|
|||
else if (strcmp(interface_name, BLUEZ_DEVICE_INTERFACE) == 0) {
|
||||
struct spa_bt_device *d;
|
||||
|
||||
spa_assert(spa_bt_device_find(monitor, object_path) == NULL);
|
||||
|
||||
d = device_create(monitor, object_path);
|
||||
d = spa_bt_device_find(monitor, object_path);
|
||||
if (d == NULL) {
|
||||
spa_log_warn(monitor->log, "can't create Bluetooth device %s: %m",
|
||||
object_path);
|
||||
return;
|
||||
d = device_create(monitor, object_path);
|
||||
if (d == NULL) {
|
||||
spa_log_warn(monitor->log, "can't create Bluetooth device %s: %m",
|
||||
object_path);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
device_update_props(d, props_iter, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue