mirror of
https://github.com/apache/nuttx.git
synced 2026-08-20 21:18:23 +00:00
get/setsockopt: change break to return OK to fix bug
N/A Change-Id: Ie5ecf640bcba6137904fcf3a0a465b2bc5d1cb92 Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
97240b494d
commit
d64d558adb
2 changed files with 5 additions and 3 deletions
|
|
@ -141,7 +141,8 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
|
|||
net_dsec2timeval(timeo, (struct timeval *)value);
|
||||
*value_len = sizeof(struct timeval);
|
||||
}
|
||||
break;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_USRSOCK
|
||||
|
|
|
|||
|
|
@ -148,13 +148,14 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
|
|||
_SO_SETOPT(psock->s_options, option);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_USRSOCK
|
||||
if (psock->s_type == SOCK_USRSOCK_TYPE)
|
||||
{
|
||||
return -ENOPROTOOPT;
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue