mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-24 01:52:08 +08:00
Ensure data cannot be sent to a TCP socket if the socket is in the process of closing.
Correct definition of StaticTask_t in the case that portUSE_MPU_WRAPPERS is set to 1. prvTaskCheckFreeStackSpace() now returns configSTACK_DEPTH_TYPE to allow return values greater than max uint16_t value if required. xStreamBufferSend() and xStreamBufferReceive() no longer clear task notification bits - clearing was unnecessary as only the task notification state is used.
This commit is contained in:
@ -2376,7 +2376,9 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket )
|
||||
{
|
||||
xResult = -pdFREERTOS_ERRNO_ENOMEM;
|
||||
}
|
||||
else if( pxSocket->u.xTCP.ucTCPState == eCLOSED )
|
||||
else if( ( pxSocket->u.xTCP.ucTCPState == eCLOSED ) ||
|
||||
( pxSocket->u.xTCP.ucTCPState == eCLOSE_WAIT ) ||
|
||||
( pxSocket->u.xTCP.ucTCPState == eCLOSING ) )
|
||||
{
|
||||
xResult = -pdFREERTOS_ERRNO_ENOTCONN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user