mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
sendto should always call send if to == NULL || tolen <= 0
Since UDP socket may bind the target with connect call
This commit is contained in:
parent
7e67add999
commit
0fc7668d65
1 changed files with 0 additions and 6 deletions
|
|
@ -139,13 +139,7 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf,
|
|||
|
||||
if (to == NULL || tolen <= 0)
|
||||
{
|
||||
#if defined(CONFIG_NET_TCP) || defined(CONFIG_NET_LOCAL_STREAM) || \
|
||||
defined(CONFIG_NET_USRSOCK)
|
||||
return psock_send(psock, buf, len, flags);
|
||||
#else
|
||||
nerr("ERROR: No 'to' address\n");
|
||||
return -EINVAL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Verify that the psock corresponds to valid, allocated socket */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue