mirror of
https://github.com/apache/nuttx.git
synced 2026-09-07 01:16:36 +00:00
netdev_file_ioctl: Fix fcntl F_SETFL O_NONBLOCK regression
This fixes a regression caused by the following commit,
which prevents the file flag from being updated.
```
commit 28860b5242
Author: chao.an <anchao@xiaomi.com>
Date: Sat Mar 19 14:47:37 2022 +0800
net/netdev: fix switch case missing break
Signed-off-by: chao.an <anchao@xiaomi.com>
```
Note: some applications like mbedtls uses F_GETFL to confirm
the nonblock-ness of the socket. This is critical for such
applications.
This commit is contained in:
parent
37ef22b106
commit
bc0ca51243
1 changed files with 1 additions and 1 deletions
|
|
@ -1522,7 +1522,7 @@ static int netdev_file_ioctl(FAR struct socket *psock, int cmd,
|
|||
conn->s_flags &= ~_SF_NONBLOCK;
|
||||
}
|
||||
|
||||
ret = OK;
|
||||
ret = -ENOTTY; /* let file_vioctl update f_oflags */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue