summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-05-29 07:39:11 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-05-29 07:39:11 +0000
commitde29b2ff1d8531fd0583e49e4b8840198681ffe8 (patch)
tree12b97cdb7c88503a37cbb1df55389abf86d2ae87
parent73f5d492078f1438a6d8164010a779e676b8c2d3 (diff)
Handle the service UUID mapping via device driver
-rw-r--r--hcid/device.c5
-rw-r--r--serial/main.c5
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);