summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-11 03:59:47 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-11 03:59:47 +0000
commit3c6856c212c6696eee02deae50788b102db8cf4d (patch)
tree3d3de69bb72bc34cf503948db299cad54a1ad255
parent7244ccaea6e7e6eadec3b5b2e2be1f8b3d030d81 (diff)
Use auth requirement proposed by kernel if available
-rw-r--r--hcid/dbus-hci.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 2bd32c23..94cbd18a 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -2454,19 +2454,16 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,
debug("kernel authentication requirement = 0x%02x", type);
+ *auth = (type == 0xff) ? 0x00 : type;
+
ba2str(remote, addr);
device = adapter_find_device(adapter, addr);
if (device && device->agent) {
agent = device->agent;
*auth = 0x03;
- } else {
+ } else
agent = adapter->agent;
- *auth = 0x00;
- }
-
- if (type != 0xff && type & 0x01)
- *auth |= 0x01;
if (!agent) {
if (!(type & 0x01)) {