mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Ensure the private port number wrap check is inside the critical section in prvGetPrivatePortNumber() (UDP).
Add missing default values for some of the trace macros.
This commit is contained in:
parent
63bd3ebbef
commit
818abc468d
|
@ -932,8 +932,8 @@ uint16_t usReturn;
|
||||||
|
|
||||||
/* Assign the next port in the range. */
|
/* Assign the next port in the range. */
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
|
{
|
||||||
usNextPortToUse++;
|
usNextPortToUse++;
|
||||||
taskEXIT_CRITICAL();
|
|
||||||
|
|
||||||
/* Has it overflowed? */
|
/* Has it overflowed? */
|
||||||
if( usNextPortToUse == 0U )
|
if( usNextPortToUse == 0U )
|
||||||
|
@ -943,6 +943,8 @@ uint16_t usReturn;
|
||||||
create first so the early port numbers may still be in use. */
|
create first so the early port numbers may still be in use. */
|
||||||
usNextPortToUse = socketAUTO_PORT_ALLOCATION_RESET_NUMBER;
|
usNextPortToUse = socketAUTO_PORT_ALLOCATION_RESET_NUMBER;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
taskEXIT_CRITICAL();
|
||||||
|
|
||||||
usReturn = FreeRTOS_htons( usNextPortToUse );
|
usReturn = FreeRTOS_htons( usNextPortToUse );
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/UDP_IP_Trace.shtml */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef iptraceWAITING_FOR_TX_DMA_DESCRIPTOR
|
#ifndef iptraceWAITING_FOR_TX_DMA_DESCRIPTOR
|
||||||
#define iptraceWAITING_FOR_TX_DMA_DESCRIPTOR
|
#define iptraceWAITING_FOR_TX_DMA_DESCRIPTOR()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS
|
#ifndef ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS
|
||||||
|
@ -174,4 +174,21 @@ http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/UDP_IP_Trace.shtml */
|
||||||
#ifndef iptraceFAILED_TO_NOTIFY_SELECT_GROUP
|
#ifndef iptraceFAILED_TO_NOTIFY_SELECT_GROUP
|
||||||
#define iptraceFAILED_TO_NOTIFY_SELECT_GROUP( xSocket )
|
#define iptraceFAILED_TO_NOTIFY_SELECT_GROUP( xSocket )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef iptraceRECVFROM_TIMEOUT
|
||||||
|
#define iptraceRECVFROM_TIMEOUT()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef iptraceNO_BUFFER_FOR_SENDTO
|
||||||
|
#define iptraceNO_BUFFER_FOR_SENDTO()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef iptraceSENDTO_SOCKET_NOT_BOUND
|
||||||
|
#define iptraceSENDTO_SOCKET_NOT_BOUND()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef iptraceSENDTO_DATA_TOO_LONG
|
||||||
|
#define iptraceSENDTO_DATA_TOO_LONG()
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* UDP_TRACE_MACRO_DEFAULTS_H */
|
#endif /* UDP_TRACE_MACRO_DEFAULTS_H */
|
||||||
|
|
Loading…
Reference in a new issue