Remove device and transport for broadcast source on interfaces_removed

This commit is contained in:
Silviu Florian Barbulescu 2024-03-13 11:48:22 +02:00 committed by Wim Taymans
parent ab87eba149
commit 1259829ac3

View file

@ -5570,6 +5570,18 @@ static void interfaces_removed(struct spa_bt_monitor *monitor, DBusMessageIter *
if (d) if (d)
spa_bt_device_emit_profiles_changed(d, d->profiles, d->connected_profiles); spa_bt_device_emit_profiles_changed(d, d->profiles, d->connected_profiles);
} }
} else if (spa_streq(interface_name, BLUEZ_MEDIA_TRANSPORT_INTERFACE)) {
struct spa_bt_transport *transport;
transport = spa_bt_transport_find(monitor, object_path);
if (transport->profile == SPA_BT_PROFILE_BAP_BROADCAST_SINK) {
if (transport != NULL) {
struct spa_bt_device *d = transport->device;
if (d != NULL){
device_free(d);
}
}
spa_bt_transport_free(transport);
}
} }
dbus_message_iter_next(&it); dbus_message_iter_next(&it);