mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
net: Make si_listen callback optional
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
2553b7701c
commit
a97e2523a4
+6
-1
@@ -82,7 +82,12 @@ int psock_listen(FAR struct socket *psock, int backlog)
|
||||
|
||||
/* Let the address family's listen() method handle the operation */
|
||||
|
||||
DEBUGASSERT(psock->s_sockif != NULL && psock->s_sockif->si_listen != NULL);
|
||||
DEBUGASSERT(psock->s_sockif != NULL);
|
||||
if (psock->s_sockif->si_listen == NULL)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
ret = psock->s_sockif->si_listen(psock, backlog);
|
||||
if (ret >= 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user