From: richardbarry Date: Wed, 23 Oct 2013 13:59:51 +0000 (+0000) Subject: Second attempt - Ensure the private port number wrap check is inside the critical... X-Git-Tag: V7.6.0~32 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1354f976ebaa473f27de8ec66eaa9f9080a4afb2;p=freertos Second attempt - Ensure the private port number wrap check is inside the critical section in prvGetPrivatePortNumber() (UDP). git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2075 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c index 5c9ff73de..ffd1a812e 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c @@ -943,11 +943,11 @@ uint16_t usReturn; create first so the early port numbers may still be in use. */ usNextPortToUse = socketAUTO_PORT_ALLOCATION_RESET_NUMBER; } + + usReturn = FreeRTOS_htons( usNextPortToUse ); } taskEXIT_CRITICAL(); - usReturn = FreeRTOS_htons( usNextPortToUse ); - return usReturn; } /* Tested */ /*-----------------------------------------------------------*/