mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-19 14:54:28 +08:00
Sync FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP with the version in GitHub at (23665258cabe49d5d68ba23968b6845a7c80eb34).
Notes: - header has version 2.2.0. - This sync did not bring in ./test directory, though we should. - New NetworkInterfaces are introduced by this merge. - Keil compiler support. - FreeRTOS_IP.h new API xApplicationGetRandomNumber(). - FreeRTOS_IP_Private.h new eIPEvent_t eNetworkTxEvent. - FreeRTOS_Stream_Buffer.h removing static xStreamBufferIsEmpty() and xStreamBufferIsFull(). - FreeRTOSConfigDefaults.h provides default ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS. - other type changes.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.0.11
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
@ -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