diff options
-rw-r--r-- | hcid/device.c | 5 | ||||
-rw-r--r-- | serial/main.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/hcid/device.c b/hcid/device.c index f8550b4a..ec0429af 100644 --- a/hcid/device.c +++ b/hcid/device.c @@ -56,6 +56,7 @@ #include "device.h" #include "dbus-common.h" #include "dbus-hci.h" +#include "dbus-service.h" #include "error.h" #include "glib-helper.h" #include "agent.h" @@ -1176,10 +1177,14 @@ int btd_register_device_driver(struct btd_device_driver *driver) debug("name %s uuid %s", driver->name, *uuid); } + register_service(driver->name, driver->uuids); + return 0; } void btd_unregister_device_driver(struct btd_device_driver *driver) { + unregister_service(driver->name); + drivers = g_slist_remove(drivers, driver); } diff --git a/serial/main.c b/serial/main.c index fcff75f5..d0d24982 100644 --- a/serial/main.c +++ b/serial/main.c @@ -36,7 +36,6 @@ #include "plugin.h" #include "device.h" #include "logging.h" -#include "dbus-service.h" #include "manager.h" #define SERIAL_INTERFACE "org.bluez.Serial" @@ -107,8 +106,6 @@ static int serial_init(void) return -EIO; } - register_service("serial", NULL); - btd_register_device_driver(&serial_driver); return 0; @@ -118,8 +115,6 @@ static void serial_exit(void) { btd_unregister_device_driver(&serial_driver); - unregister_service("serial"); - serial_manager_exit(); dbus_connection_unref(conn); |