diff options
Diffstat (limited to 'src/dbus-hci.c')
-rw-r--r-- | src/dbus-hci.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c index 7e258989..4141b691 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -1831,22 +1831,20 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote, agent = adapter->agent; if (!agent) { - /* No agent available, and no bonding case (acceptor) */ - if (device && (device_get_auth(device) == 0x00 || - device_get_auth(device) == 0x01)) { - /* No input, no output */ - *cap = 0x03; - return 0; + /* 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 (initiator) */ - if (*auth == 0x00 || *auth == 0x01) { + /* No agent available, and no bonding case */ + if (*auth < 0x02) { + debug("Allowing no bonding without agent"); /* No input, no output */ *cap = 0x03; return 0; } - /* This is the non bondable case */ error("No agent available for IO capability"); return -1; } |