You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/16 15:28:07 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4116: net: Add file_socket function

gustavonihei commented on a change in pull request #4116:
URL: https://github.com/apache/incubator-nuttx/pull/4116#discussion_r671342941



##########
File path: net/socket/net_sendfile.c
##########
@@ -130,8 +130,8 @@ ssize_t psock_sendfile(FAR struct socket *psock, FAR struct file *infile,
   if (psock == NULL || psock->s_conn == NULL)
     {
       nerr("ERROR: Invalid socket\n");
-      _SO_SETERRNO(psock, EBADF);
-      return ERROR;
+      psock->s_error = EBADF;

Review comment:
       `psock_sendfile` documentation must be updated to reflect the current implementation. The __Return Value__ section still states that on failure it returns -1 and sets `errno`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org