Merged in rtakacs/nuttx/fix_tcp_listen (pull request #409)

Throw error when error happens in the tcp_listen function

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Roland Takacs 2017-06-19 13:33:46 +00:00 committed by Gregory Nutt
commit 7f59908864
1 changed files with 7 additions and 1 deletions

View File

@ -151,7 +151,13 @@ int psock_listen(FAR struct socket *psock, int backlog)
* accept() is called and enables poll()/select() logic.
*/
tcp_listen(conn);
errcode = tcp_listen(conn);
if (errcode < 0)
{
errcode = -errcode;
goto errout;
}
#else
errcode = EOPNOTSUPP;
goto errout;