summaryrefslogtreecommitdiffstats
path: root/src/dbus-hci.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-08-27 18:12:19 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-08-27 18:12:19 +0200
commit8e0f32408df6b817128d61eae264d8a5b38d7929 (patch)
tree34e5b8a4f1d18bef86c48ace4449c3dfac67dbe9 /src/dbus-hci.c
parentea3f9b2d644e2c1beeccc01591b302f5ed8a77bd (diff)
Update IO capa selection process
Diffstat (limited to 'src/dbus-hci.c')
-rw-r--r--src/dbus-hci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index bc1528f8..44c56bbf 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -1820,6 +1820,7 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,
ba2str(remote, addr);
+ /* For CreatePairedDevice use dedicated bonding */
device = adapter_find_device(adapter, addr);
if (device) {
agent = device_get_agent(device);
@@ -1830,6 +1831,7 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,
agent = adapter->agent;
if (!agent) {
+ /* No agent available, and no bonding case */
if (device_get_auth(device) == 0x00 ||
device_get_auth(device) == 0x01) {
/* No input, no output */
@@ -1840,6 +1842,13 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,
return -1;
}
+ if (device && *auth < 0x02) {
+ /* If remote requests dedicated bonding follow that lead */
+ if (device_get_auth(device) == 0x02 ||
+ device_get_auth(device) == 0x03)
+ *auth = 0x02;
+ }
+
*cap = agent_get_io_capability(agent);
return 0;