Commit ad8491df authored by Julian Bouzas's avatar Julian Bouzas

modules: destroy all alsa/bluez nodes when an alsa/bluez device is removed

parent c473cecb
......@@ -415,12 +415,18 @@ update_device(struct impl *impl, struct device *dev,
static void
destroy_device(struct impl *impl, struct device *dev)
{
struct node *node;
/* Remove the device from the list */
spa_list_remove(&dev->link);
/* Remove the device listener */
spa_hook_remove(&dev->device_listener);
/* Destry all the nodes that the device has */
spa_list_consume(node, &dev->node_list, link)
destroy_node(impl, dev, node);
/* Destroy the device proxy */
pw_proxy_destroy(dev->proxy);
......
......@@ -445,12 +445,18 @@ update_device(struct impl *impl, struct device *dev,
static void
destroy_device(struct impl *impl, struct device *dev)
{
struct node *node;
/* Remove the device from the list */
spa_list_remove(&dev->link);
/* Remove the device listener */
spa_hook_remove(&dev->device_listener);
/* Destry all the nodes that the device has */
spa_list_consume(node, &dev->node_list, link)
destroy_node(impl, dev, node);
/* Destroy the device proxy */
pw_proxy_destroy(dev->proxy);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment