]> git.sur5r.net Git - freertos/commitdiff
Second attempt - Ensure the private port number wrap check is inside the critical...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 23 Oct 2013 13:59:51 +0000 (13:59 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 23 Oct 2013 13:59:51 +0000 (13:59 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2075 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c

index 5c9ff73dec19cd34f32c0a7062b5a87dc86e0ca1..ffd1a812edb97c421f67401a06f68c4196b37457 100644 (file)
@@ -943,11 +943,11 @@ uint16_t usReturn;
                        create first so the early port numbers may still be in use. */\r
                        usNextPortToUse = socketAUTO_PORT_ALLOCATION_RESET_NUMBER;\r
                }\r
+\r
+               usReturn = FreeRTOS_htons( usNextPortToUse );\r
        }\r
        taskEXIT_CRITICAL();\r
 \r
-       usReturn = FreeRTOS_htons( usNextPortToUse );\r
-\r
        return usReturn;\r
 } /* Tested */\r
 /*-----------------------------------------------------------*/\r