mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08: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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user