Socket I/F: Fix bad copy-past error. sendto() was called the address family's send() instead of sendto().
This commit is contained in:
parent
c964cd4612
commit
79a09bfd6e
|
@ -909,6 +909,9 @@ udgram
|
|||
nsh> server &
|
||||
nsh> client
|
||||
|
||||
For the sake of sanity, binfs and logins are disabled in this
|
||||
configuration.
|
||||
|
||||
unionfs
|
||||
|
||||
This is a version of NSH dedicated to performing the simple test
|
||||
|
|
|
@ -15,14 +15,15 @@ CONFIG_DEBUG_SYMBOLS=y
|
|||
CONFIG_DISABLE_POLL=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NSH=y
|
||||
CONFIG_EXAMPLES_UDGRAM_CLIENT_STACKSIZE=8192
|
||||
CONFIG_EXAMPLES_UDGRAM_SERVER_STACKSIZE=8192
|
||||
CONFIG_EXAMPLES_UDGRAM=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_BINFS=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=4096
|
||||
CONFIG_IDLETHREAD_STACKSIZE=8192
|
||||
CONFIG_LIBC_EXECFUNCS=y
|
||||
CONFIG_MAX_TASKS=64
|
||||
CONFIG_NET_LOCAL=y
|
||||
|
@ -45,4 +46,4 @@ CONFIG_SIM_WALLTIME=y
|
|||
CONFIG_START_MONTH=6
|
||||
CONFIG_START_YEAR=2008
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_USERMAIN_STACKSIZE=4096
|
||||
CONFIG_USERMAIN_STACKSIZE=8192
|
||||
|
|
|
@ -150,17 +150,17 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf,
|
|||
|
||||
/* Verify that the psock corresponds to valid, allocated socket */
|
||||
|
||||
if (!psock || psock->s_crefs <= 0)
|
||||
if (psock == NULL || psock->s_crefs <= 0)
|
||||
{
|
||||
nerr("ERROR: Invalid socket\n");
|
||||
errcode = EBADF;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
/* Let the address family's send() method handle the operation */
|
||||
/* Let the address family's sendto() method handle the operation */
|
||||
|
||||
DEBUGASSERT(psock->s_sockif != NULL && psock->s_sockif->si_send != NULL);
|
||||
nsent = psock->s_sockif->si_send(psock, buf, len, flags);
|
||||
DEBUGASSERT(psock->s_sockif != NULL && psock->s_sockif->si_sendto != NULL);
|
||||
nsent = psock->s_sockif->si_sendto(psock, buf, len, flags, to, tolen);
|
||||
|
||||
/* Check if the domain-specific sendto() logic failed */
|
||||
|
||||
|
|
Loading…
Reference in New Issue