mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 14:02:10 +00:00
[Bluetooth] Return EINPROGRESS for non-blocking socket calls
In case of non-blocking socket calls we should return EINPROGRESS and not EAGAIN. Signed-off-by: Ulisses Furquim <ulissesf@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
7785162cf2
commit
b4c612a473
@ -276,7 +276,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
||||
if (!timeo) {
|
||||
err = -EAGAIN;
|
||||
err = -EINPROGRESS;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -644,7 +644,7 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src, bdaddr_t *dst
|
||||
addr.l2_family = AF_BLUETOOTH;
|
||||
addr.l2_psm = htobs(RFCOMM_PSM);
|
||||
*err = sock->ops->connect(sock, (struct sockaddr *) &addr, sizeof(addr), O_NONBLOCK);
|
||||
if (*err == 0 || *err == -EAGAIN)
|
||||
if (*err == 0 || *err == -EINPROGRESS)
|
||||
return s;
|
||||
|
||||
rfcomm_session_del(s);
|
||||
|
Loading…
Reference in New Issue
Block a user