bluetooth: Remove all devices and adapters when org.bluez goes away
authorJoão Paulo Rechi Vita <jprvita@openbossa.org>
Tue, 24 Sep 2013 22:45:21 +0000 (19:45 -0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sun, 29 Sep 2013 13:54:36 +0000 (16:54 +0300)
src/modules/bluetooth/bluez5-util.c

index 63e3332..6196c11 100644 (file)
@@ -189,7 +189,8 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
         if (pa_streq(name, BLUEZ_SERVICE)) {
             if (old_owner && *old_owner) {
                 pa_log_debug("Bluetooth daemon disappeared");
-                /* TODO: remove all devices */
+                device_remove_all(y);
+                adapter_remove_all(y);
             }
 
             if (new_owner && *new_owner) {