From 1f9ef422f0e70f3a1d8f264407d88264ee9a7337 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 29 Aug 2008 17:51:33 +0200 Subject: Allow non-bondable and outgoing SDP without agent --- src/dbus-hci.c | 16 +++++++--------- 1 file 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; } -- cgit