]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
Update TCP/IP tack to latest form Git.
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-TCP / FreeRTOS_TCP_WIN.c
index 93fde9590831954ba0872913d66e0d50424ae9f4..784eb48aad4f3dd3111098bb2daa17bcf84f97b2 100644 (file)
@@ -292,7 +292,7 @@ void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem
        pxWhere->pxPrevious = pxNewListItem;\r
 \r
        /* Remember which list the item is in. */\r
-       pxNewListItem->pvContainer = ( void * ) pxList; /* If this line fails to build then ensure configENABLE_BACKWARD_COMPATIBILITY is set to 1 in FreeRTOSConfig.h. */\r
+       listLIST_ITEM_CONTAINER( pxNewListItem ) = ( void * ) pxList;\r
 \r
        ( pxList->uxNumberOfItems )++;\r
 }\r
@@ -675,17 +675,17 @@ const int32_t l500ms = 500;
 \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
@@ -805,20 +805,20 @@ const int32_t l500ms = 500;
                                {\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