mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
input: skip auth/encrypt if the link is not available and allow connections
This commit is contained in:
parent
e26377ac2d
commit
cc7ee42ddf
@ -557,7 +557,7 @@ static gboolean interrupt_connect_cb(GIOChannel *chan,
|
||||
if (idev->hidp.subclass & 0x40) {
|
||||
int ret;
|
||||
ret = encrypt_link(&idev->src, &idev->dst);
|
||||
if (ret < 0) {
|
||||
if (ret < 0 && ret != -ENOKEY) {
|
||||
err = -ret;
|
||||
close(ctl);
|
||||
goto failed;
|
||||
|
@ -108,7 +108,8 @@ static void create_device(struct session_data *session)
|
||||
}
|
||||
|
||||
if (req.subclass & 0x40) {
|
||||
if (encrypt_link(&session->src, &session->dst) < 0) {
|
||||
err = encrypt_link(&session->src, &session->dst);
|
||||
if (err < 0 && err != -ENOKEY) {
|
||||
if (req.rd_data)
|
||||
free(req.rd_data);
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user