summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlok Barsode <alok.barsode@azingo.com>2008-07-09 14:27:33 +0530
committerLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-07-28 10:35:42 -0300
commit491190e5dde601e4876f24a922f1ba16ae4d2e6d (patch)
tree013431a64ccab626d68efc8f722148d3be41ff03
parent595bd38a9fe105ef20d1b0527e04c7d28532d22d (diff)
Adding device_set_cap.
Signed-off-by: Alok Barsode <alok.barsode@azingo.com>
-rw-r--r--hcid/dbus-hci.c2
-rw-r--r--hcid/device.c8
-rw-r--r--hcid/device.h1
3 files changed, 10 insertions, 1 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 1afe3d8f..bc0e080a 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -2240,7 +2240,7 @@ int hcid_dbus_set_io_cap(bdaddr_t *local, bdaddr_t *remote,
device = adapter_get_device(connection, adapter, addr);
if (device) {
- device->cap = cap;
+ device_set_cap(device, cap);
device->auth = auth;
}
diff --git a/hcid/device.c b/hcid/device.c
index aad8c2d8..0ab5d595 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -986,6 +986,14 @@ void device_set_temporary(struct device *device, gboolean temporary)
device->temporary = temporary;
}
+void device_set_cap(struct device *device, uint8_t cap)
+{
+ if (!device)
+ return;
+
+ device->cap = cap;
+}
+
int btd_register_device_driver(struct btd_device_driver *driver)
{
const char **uuid;
diff --git a/hcid/device.h b/hcid/device.h
index 4f40e84a..5abdb1a1 100644
--- a/hcid/device.h
+++ b/hcid/device.h
@@ -64,6 +64,7 @@ void device_set_agent(struct device *device, struct agent *agent);
gboolean device_is_busy(struct device *device);
gboolean device_is_temporary(struct device *device);
void device_set_temporary(struct device *device, gboolean temporary);
+void device_set_cap(struct device *device, uint8_t cap);
#define BTD_UUIDS(args...) ((const char *[]) { args, NULL } )