summaryrefslogtreecommitdiff
path: root/FreeRTOS-Plus/Source
diff options
context:
space:
mode:
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2018-01-30 17:39:14 +0000
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2018-01-30 17:39:14 +0000
commitef995f1146b5d177ac161328376ce42b0a871827 (patch)
treef68c04bf7db6644448f4e66f4b3ce99261d25eab /FreeRTOS-Plus/Source
parent65f123d05c6efd96a9e219717ebc7425e73148e6 (diff)
downloadfreertos-ef995f1146b5d177ac161328376ce42b0a871827.tar.gz
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. git-svn-id: http://svn.code.sf.net/p/freertos/code/trunk@2527 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'FreeRTOS-Plus/Source')
-rw-r--r--FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c
index e40ce8d5f..10dc788ed 100644
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c
@@ -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;
}