Throw error when error happens in the tcp_listen function

This commit is contained in:
Roland Takacs 2017-06-19 12:18:05 +02:00
parent cfea8adacb
commit 4c163cf43b

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;