mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-12-17 10:36:22 +08:00
Update TCP/IP tack to latest form Git.
This commit is contained in:
@@ -292,7 +292,7 @@ void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem
|
||||
pxWhere->pxPrevious = pxNewListItem;
|
||||
|
||||
/* Remember which list the item is in. */
|
||||
pxNewListItem->pvContainer = ( void * ) pxList; /* If this line fails to build then ensure configENABLE_BACKWARD_COMPATIBILITY is set to 1 in FreeRTOSConfig.h. */
|
||||
listLIST_ITEM_CONTAINER( pxNewListItem ) = ( void * ) pxList;
|
||||
|
||||
( pxList->uxNumberOfItems )++;
|
||||
}
|
||||
@@ -675,17 +675,17 @@ const int32_t l500ms = 500;
|
||||
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
|
||||
void vTCPSegmentCleanup( void )
|
||||
{
|
||||
/* Free and clear the TCP segments pointer. This function should only be called
|
||||
* once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this
|
||||
* function. */
|
||||
if( xTCPSegments != NULL )
|
||||
{
|
||||
vPortFreeLarge( xTCPSegments );
|
||||
xTCPSegments = NULL;
|
||||
}
|
||||
}
|
||||
void vTCPSegmentCleanup( void )
|
||||
{
|
||||
/* Free and clear the TCP segments pointer. This function should only be called
|
||||
* once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this
|
||||
* function. */
|
||||
if( xTCPSegments != NULL )
|
||||
{
|
||||
vPortFreeLarge( xTCPSegments );
|
||||
xTCPSegments = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* ipconfgiUSE_TCP_WIN == 1 */
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -805,20 +805,20 @@ const int32_t l500ms = 500;
|
||||
{
|
||||
ulSavedSequenceNumber = ulCurrentSequenceNumber;
|
||||
|
||||
/* Clean up all sequence received between ulSequenceNumber and ulSequenceNumber + ulLength since they are duplicated.
|
||||
If the server is forced to retransmit packets several time in a row it might send a batch of concatenated packet for speed.
|
||||
So we cannot rely on the packets between ulSequenceNumber and ulSequenceNumber + ulLength to be sequential and it is better to just
|
||||
clean them out. */
|
||||
do
|
||||
{
|
||||
pxFound = xTCPWindowRxConfirm( pxWindow, ulSequenceNumber, ulLength );
|
||||
/* Clean up all sequence received between ulSequenceNumber and ulSequenceNumber + ulLength since they are duplicated.
|
||||
If the server is forced to retransmit packets several time in a row it might send a batch of concatenated packet for speed.
|
||||
So we cannot rely on the packets between ulSequenceNumber and ulSequenceNumber + ulLength to be sequential and it is better to just
|
||||
clean them out. */
|
||||
do
|
||||
{
|
||||
pxFound = xTCPWindowRxConfirm( pxWindow, ulSequenceNumber, ulLength );
|
||||
|
||||
if ( pxFound != NULL )
|
||||
{
|
||||
/* Remove it because it will be passed to user directly. */
|
||||
vTCPWindowFree( pxFound );
|
||||
}
|
||||
} while ( pxFound );
|
||||
if ( pxFound != NULL )
|
||||
{
|
||||
/* Remove it because it will be passed to user directly. */
|
||||
vTCPWindowFree( pxFound );
|
||||
}
|
||||
} while ( pxFound );
|
||||
|
||||
/* Check for following segments that are already in the
|
||||
queue and increment ulCurrentSequenceNumber. */
|
||||
|
||||
Reference in New Issue
Block a user