mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
net/socket: Do not enter cancellation point in psock_send() as this is already done in send()
This commit is contained in:
committed by
Gregory Nutt
parent
61878848ad
commit
1fa854285d
@@ -124,16 +124,11 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
|
|||||||
|
|
||||||
DEBUGASSERT(psock != NULL && buf != NULL);
|
DEBUGASSERT(psock != NULL && buf != NULL);
|
||||||
|
|
||||||
/* Treat as a cancellation point */
|
|
||||||
|
|
||||||
(void)enter_cancellation_point();
|
|
||||||
|
|
||||||
/* Let the address family's send() method handle the operation */
|
/* Let the address family's send() method handle the operation */
|
||||||
|
|
||||||
DEBUGASSERT(psock->s_sockif != NULL && psock->s_sockif->si_send != NULL);
|
DEBUGASSERT(psock->s_sockif != NULL && psock->s_sockif->si_send != NULL);
|
||||||
ret = psock->s_sockif->si_send(psock, buf, len, flags);
|
ret = psock->s_sockif->si_send(psock, buf, len, flags);
|
||||||
|
|
||||||
leave_cancellation_point();
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
nerr("ERROR: socket si_send() (or usrsock_sendto()) failed: %d\n", ret);
|
nerr("ERROR: socket si_send() (or usrsock_sendto()) failed: %d\n", ret);
|
||||||
|
|||||||
Reference in New Issue
Block a user