\r
/* Assign the next port in the range. */\r
taskENTER_CRITICAL();\r
+ {\r
usNextPortToUse++;\r
- taskEXIT_CRITICAL();\r
\r
- /* Has it overflowed? */\r
- if( usNextPortToUse == 0U )\r
- {\r
- /* Don't go right back to the start of the dynamic/private port\r
- range numbers as any persistent sockets are likely to have been\r
- create first so the early port numbers may still be in use. */\r
- usNextPortToUse = socketAUTO_PORT_ALLOCATION_RESET_NUMBER;\r
+ /* Has it overflowed? */\r
+ if( usNextPortToUse == 0U )\r
+ {\r
+ /* Don't go right back to the start of the dynamic/private port\r
+ range numbers as any persistent sockets are likely to have been\r
+ create first so the early port numbers may still be in use. */\r
+ usNextPortToUse = socketAUTO_PORT_ALLOCATION_RESET_NUMBER;\r
+ }\r
}\r
+ taskEXIT_CRITICAL();\r
\r
usReturn = FreeRTOS_htons( usNextPortToUse );\r
\r