summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-adapter.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-03-13 21:31:27 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-03-13 21:31:27 +0000
commit320d29761699155b1ea7b66ee9ec26322064182e (patch)
tree9e63efd39d1132ccb4661c6fbb334f3ae4e74b6f /hcid/dbus-adapter.c
parent49873571bb476f8ad9fdb818cab2d10c2b3b5d64 (diff)
Connect security interface to adapter objects
Diffstat (limited to 'hcid/dbus-adapter.c')
-rw-r--r--hcid/dbus-adapter.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c
index 33ef99eb..0aff95bf 100644
--- a/hcid/dbus-adapter.c
+++ b/hcid/dbus-adapter.c
@@ -1318,24 +1318,26 @@ static struct service_data dev_services[] = {
DBusHandlerResult msg_func_device(DBusConnection *conn, DBusMessage *msg, void *data)
{
- service_handler_func_t handler;
struct hci_dbus_data *dbus_data = data;
const char *iface;
iface = dbus_message_get_interface(msg);
- if (strcmp(ADAPTER_INTERFACE, iface))
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-
if (dbus_data->path_id == ADAPTER_ROOT_ID) {
/* Adapter is down (path unregistered) or the path is wrong */
return error_no_such_adapter(conn, msg);
}
- handler = find_service_handler(dev_services, msg);
+ if (!strcmp(ADAPTER_INTERFACE, iface)) {
+ service_handler_func_t handler;
+
+ handler = find_service_handler(dev_services, msg);
- if (handler)
- return handler(conn, msg, data);
+ if (handler)
+ return handler(conn, msg, data);
+ }
+ else if (!strcmp(SECURITY_INTERFACE, iface))
+ return handle_security_method(conn, msg, data);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}