summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-08-29 17:51:33 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-08-29 17:51:33 +0200
commit1f9ef422f0e70f3a1d8f264407d88264ee9a7337 (patch)
treea09836c2a5482e5b8930c17d7fe2992d219b6e5b /src
parent8b9dbbe4959a1aa384daf876a791ca4947b4c206 (diff)
Allow non-bondable and outgoing SDP without agent
Diffstat (limited to 'src')
-rw-r--r--src/dbus-hci.c16
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;
}