]> git.sur5r.net Git - freertos/commitdiff
Ensure the private port number wrap check is inside the critical section in prvGetPri...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 23 Oct 2013 10:28:17 +0000 (10:28 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 23 Oct 2013 10:28:17 +0000 (10:28 +0000)
Add missing default values for some of the trace macros.

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2074 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/IPTraceMacroDefaults.h

index 4ce79b1c4bf447a5e25f4a105be4ec2bb270f814..5c9ff73dec19cd34f32c0a7062b5a87dc86e0ca1 100644 (file)
@@ -932,17 +932,19 @@ uint16_t usReturn;
 \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
index 892ba111f1e23c12468a60aac054dc503f72f92e..29b42df4ed054daa52db51fcf3d638872d48882f 100644 (file)
@@ -164,7 +164,7 @@ http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/UDP_IP_Trace.shtml */
 #endif\r
 \r
 #ifndef        iptraceWAITING_FOR_TX_DMA_DESCRIPTOR\r
-       #define iptraceWAITING_FOR_TX_DMA_DESCRIPTOR\r
+       #define iptraceWAITING_FOR_TX_DMA_DESCRIPTOR()\r
 #endif\r
 \r
 #ifndef ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS\r
@@ -174,4 +174,21 @@ http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/UDP_IP_Trace.shtml */
 #ifndef iptraceFAILED_TO_NOTIFY_SELECT_GROUP\r
        #define iptraceFAILED_TO_NOTIFY_SELECT_GROUP( xSocket )\r
 #endif\r
+\r
+#ifndef iptraceRECVFROM_TIMEOUT\r
+       #define iptraceRECVFROM_TIMEOUT()\r
+#endif\r
+\r
+#ifndef iptraceNO_BUFFER_FOR_SENDTO\r
+       #define iptraceNO_BUFFER_FOR_SENDTO()\r
+#endif\r
+\r
+#ifndef iptraceSENDTO_SOCKET_NOT_BOUND\r
+       #define iptraceSENDTO_SOCKET_NOT_BOUND()\r
+#endif\r
+\r
+#ifndef iptraceSENDTO_DATA_TOO_LONG\r
+       #define iptraceSENDTO_DATA_TOO_LONG()\r
+#endif\r
+\r
 #endif /* UDP_TRACE_MACRO_DEFAULTS_H */\r