This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 03265caa7a inet_sendto: correct error messages and remove the comment
03265caa7a is described below
commit 03265caa7adb1c66f540dfed6a8cc681589db655
Author: zhanghongyu <[email protected]>
AuthorDate: Mon Apr 17 13:24:47 2023 +0800
inet_sendto: correct error messages and remove the comment
Comment information and printing do not match the actual function.
Signed-off-by: zhanghongyu <[email protected]>
---
net/inet/inet_sockif.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c
index 3b85880797..2f63f94751 100644
--- a/net/inet/inet_sockif.c
+++ b/net/inet/inet_sockif.c
@@ -1823,11 +1823,9 @@ static ssize_t inet_sendto(FAR struct socket *psock, FAR
const void *buf,
}
#ifdef CONFIG_NET_UDP
- /* If this is a connected socket, then return EISCONN */
-
if (psock->s_type != SOCK_DGRAM)
{
- nerr("ERROR: Connected socket\n");
+ nerr("ERROR: Inappropriate socket type %d\n", psock->s_type);
return -EBADF;
}