/*\r
- * FreeRTOS+TCP 191100 experimental\r
- * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\r
+ * FreeRTOS+TCP V2.2.0\r
+ * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\r
*\r
* Permission is hereby granted, free of charge, to any person obtaining a copy of\r
* this software and associated documentation files (the "Software"), to deal in\r
\r
#if( ipconfigUSE_TCP_WIN == 1 )\r
\r
- void vTCPSegmentCleanup( void )\r
- {\r
- /* Free and clear the TCP segments pointer. This function should only be called\r
- * once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this\r
- * function. */\r
- if( xTCPSegments != NULL )\r
- {\r
- vPortFreeLarge( xTCPSegments );\r
- xTCPSegments = NULL;\r
- }\r
- }\r
+ void vTCPSegmentCleanup( void )\r
+ {\r
+ /* Free and clear the TCP segments pointer. This function should only be called\r
+ * once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this\r
+ * function. */\r
+ if( xTCPSegments != NULL )\r
+ {\r
+ vPortFreeLarge( xTCPSegments );\r
+ xTCPSegments = NULL;\r
+ }\r
+ }\r
\r
#endif /* ipconfgiUSE_TCP_WIN == 1 */\r
/*-----------------------------------------------------------*/\r
{\r
ulSavedSequenceNumber = ulCurrentSequenceNumber;\r
\r
- /* Clean up all sequence received between ulSequenceNumber and ulSequenceNumber + ulLength since they are duplicated.\r
- If the server is forced to retransmit packets several time in a row it might send a batch of concatenated packet for speed.\r
- So we cannot rely on the packets between ulSequenceNumber and ulSequenceNumber + ulLength to be sequential and it is better to just\r
- clean them out. */\r
- do\r
- {\r
- pxFound = xTCPWindowRxConfirm( pxWindow, ulSequenceNumber, ulLength );\r
-\r
- if ( pxFound != NULL )\r
- {\r
- /* Remove it because it will be passed to user directly. */\r
- vTCPWindowFree( pxFound );\r
- }\r
- } while ( pxFound );\r
+ /* Clean up all sequence received between ulSequenceNumber and ulSequenceNumber + ulLength since they are duplicated.\r
+ If the server is forced to retransmit packets several time in a row it might send a batch of concatenated packet for speed.\r
+ So we cannot rely on the packets between ulSequenceNumber and ulSequenceNumber + ulLength to be sequential and it is better to just\r
+ clean them out. */\r
+ do\r
+ {\r
+ pxFound = xTCPWindowRxConfirm( pxWindow, ulSequenceNumber, ulLength );\r
+\r
+ if ( pxFound != NULL )\r
+ {\r
+ /* Remove it because it will be passed to user directly. */\r
+ vTCPWindowFree( pxFound );\r
+ }\r
+ } while ( pxFound );\r
\r
/* Check for following segments that are already in the\r
queue and increment ulCurrentSequenceNumber. */\r