]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/stream_buffer.c
Ensure data cannot be sent to a TCP socket if the socket is in the process of closing.
[freertos] / FreeRTOS / Source / stream_buffer.c
index c0ef7272a99b53d1060b6a231043981f15cdddb6..40619108a7755bd8ac4f6b13148d3b3ba359cbbc 100644 (file)
@@ -540,7 +540,7 @@ TimeOut_t xTimeOut;
                        taskEXIT_CRITICAL();\r
 \r
                        traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer );\r
-                       ( void ) xTaskNotifyWait( ( uint32_t ) 0, UINT32_MAX, NULL, xTicksToWait );\r
+                       ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait );\r
                        pxStreamBuffer->xTaskWaitingToSend = NULL;\r
 \r
                } while( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE );\r
@@ -746,7 +746,7 @@ size_t xReceivedLength = 0, xBytesAvailable, xBytesToStoreMessageLength;
                {\r
                        /* Wait for data to be available. */\r
                        traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer );\r
-                       ( void ) xTaskNotifyWait( ( uint32_t ) 0, UINT32_MAX, NULL, xTicksToWait );\r
+                       ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait );\r
                        pxStreamBuffer->xTaskWaitingToReceive = NULL;\r
 \r
                        /* Recheck the data available after blocking. */\r