From 6a19f799deaf0c4b30f6c3eb381d3a54576aba43 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 12 Jun 2008 16:45:42 +0000 Subject: Store IO capabilities of remote device in device object --- hcid/dbus-hci.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'hcid/dbus-hci.c') diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index e770e70d..8700f4d1 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -2473,6 +2473,24 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote, int hcid_dbus_set_io_cap(bdaddr_t *local, bdaddr_t *remote, uint8_t cap, uint8_t auth) { + struct adapter *adapter; + struct device *device; + char addr[18]; + + adapter = manager_find_adapter(local); + if (!adapter) { + error("No matching adapter found"); + return -1; + } + + ba2str(remote, addr); + + device = adapter_get_device(connection, adapter, addr); + if (device) { + device->cap = cap; + device->auth = auth; + } + return 0; } -- cgit