diff options
Diffstat (limited to 'audio/device.c')
-rw-r--r-- | audio/device.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/audio/device.c b/audio/device.c index 19ce3b41..b5ba61a2 100644 --- a/audio/device.c +++ b/audio/device.c @@ -56,15 +56,6 @@ static void device_free(struct audio_device *dev) { - if (dev->headset) - headset_free(dev); - - if (dev->sink) - sink_free(dev); - - if (dev->control) - control_free(dev); - if (dev->conn) dbus_connection_unref(dev->conn); @@ -119,7 +110,14 @@ gboolean device_is_connected(struct audio_device *dev, const char *interface) void device_unregister(struct audio_device *device) { - g_dbus_unregister_all_interfaces(device->conn, device->path); + if (device->headset) + headset_unregister(device); + + if (device->sink) + sink_unregister(device); + + if (device->control) + control_unregister(device); device_free(device); } |