diff options
Diffstat (limited to 'src/dbus-hci.c')
-rw-r--r-- | src/dbus-hci.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c index 57449cbb..70b15062 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -56,6 +56,7 @@ #include "glib-helper.h" #include "dbus-common.h" #include "agent.h" +#include "storage.h" static DBusConnection *connection = NULL; @@ -1665,13 +1666,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; } |