summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/security.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/security.c b/src/security.c
index 4f295a4a..5c295574 100644
--- a/src/security.c
+++ b/src/security.c
@@ -303,11 +303,12 @@ static void link_key_request(int dev, bdaddr_t *sba, bdaddr_t *dba)
bacpy(&req.bdaddr, dba);
err = ioctl(dev, HCIGETAUTHINFO, (unsigned long) &req);
- if (err < 0 && errno != EINVAL)
- debug("HCIGETAUTHINFO failed %s (%d)",
- strerror(errno), errno);
- else
+ if (err < 0) {
+ if (errno != EINVAL)
+ debug("HCIGETAUTHINFO failed %s (%d)",
+ strerror(errno), errno);
req.type = 0x00;
+ }
debug("kernel auth requirements = 0x%02x", req.type);