net/soerr: add new _SO_CONN_SETERRNO() macro

support so error code set from conn instance

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2022-11-24 19:15:10 +08:00
committed by Xiang Xiao
parent 6d8c28a83c
commit f2a7711ef8
4 changed files with 22 additions and 13 deletions
+1 -2
View File
@@ -133,8 +133,7 @@ ssize_t psock_sendfile(FAR struct socket *psock, FAR struct file *infile,
if (ret < 0)
{
FAR struct socket_conn_s *conn = psock->s_conn;
conn->s_error = -ret;
_SO_SETERRNO(psock, -ret);
}
return ret;