summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-01-13 15:25:57 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-01-13 15:25:57 +0200
commitcd050e431ddbecf708483fe58e288b671010f2d6 (patch)
tree32b900edddf854fc391d2f84b60e05d4985cd132 /src
parent51382802f433d7ce6ee1d5ceeeb1d90d543d0e6d (diff)
Fix no-bonding connections in non-bondable mode
Diffstat (limited to 'src')
-rw-r--r--src/dbus-hci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 290bbfd6..9ddd65ec 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -1228,8 +1228,15 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,
/* Check if the adapter is not pairable and if there isn't a bonding in
* progress */
if (!adapter_is_pairable(adapter) &&
- !(device && device_is_bonding(device, NULL)))
+ !(device && device_is_bonding(device, NULL))) {
+ if (*auth < 0x02) {
+ debug("Allowing no bonding in non-bondable mode");
+ /* No input, no output */
+ *cap = 0x03;
+ goto done;
+ }
return -EPERM;
+ }
/* For CreatePairedDevice use dedicated bonding */
if (device) {