summaryrefslogtreecommitdiffstats
path: root/hcid/security.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-16 01:49:07 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-16 01:49:07 +0000
commitb509da915a937dc34d37d12ff1e45c1b3105aeb2 (patch)
tree1436bb99c5a80b8789d35d6778111f1b6f507ce6 /hcid/security.c
parent48e457f024ec0ee3fdf00687a26c2ffdf11ec1ca (diff)
Improve the auth requirement handling
Diffstat (limited to 'hcid/security.c')
-rw-r--r--hcid/security.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hcid/security.c b/hcid/security.c
index bc807377..71cd5e4e 100644
--- a/hcid/security.c
+++ b/hcid/security.c
@@ -287,13 +287,15 @@ static void link_key_request(int dev, bdaddr_t *sba, bdaddr_t *dba)
memset(&req, 0, sizeof(req));
bacpy(&req.bdaddr, dba);
- req.type = 0xff;
err = ioctl(dev, HCIGETAUTHINFO, (unsigned long) &req);
if (err < 0)
- debug("HCIGETAUTHINFO failed (%d)", errno);
+ debug("HCIGETAUTHINFO failed (%d)",
+ strerror(errno), errno);
+ else
+ req.type = 0x00;
- debug("kernel authentication requirement = 0x%02x", req.type);
+ debug("kernel auth requirements = 0x%02x", req.type);
err = read_link_key(sba, dba, key, &type);
if (err < 0) {