diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus-hci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c index a7b83c0b..e4c0f345 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -1832,13 +1832,20 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote, agent = adapter->agent; if (!agent) { + /* This is the non bondable mode case */ + if (device && device_get_auth(device) > 0x01) { + debug("Bonding request, but no agent present"); + return -1; + } + /* No agent available, and no bonding case */ - if (device && (device_get_auth(device) == 0x00 || - device_get_auth(device) == 0x01)) { + if (*auth < 0x02) { + debug("Allowing no bonding without agent"); /* No input, no output */ *cap = 0x03; return 0; } + error("No agent available for IO capability"); return -1; } |