Skip to content

Commit ce53662

Browse files
committed
review feedback changes
1 parent c5dc60d commit ce53662

File tree

4 files changed

+15
-46
lines changed

4 files changed

+15
-46
lines changed

source/FreeRTOS_DHCPv6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ void vDHCPv6Process( BaseType_t xReset,
325325
}
326326
else
327327
{
328-
FreeRTOS_printf( ( "vDHCPv6Process: malloc failed %u bytes\n", ( unsigned ) sizeof( *pxEndPoint->pxDHCPMessage ) ) );
328+
FreeRTOS_printf( ( "vDHCPv6Process: malloc failed %u bytes\n", ( unsigned int ) sizeof( *pxEndPoint->pxDHCPMessage ) ) );
329329
}
330330
}
331331
}

source/FreeRTOS_DNS_Parser.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,10 @@
313313
xSet.usPortNumber = usPort;
314314
xSet.ppxLastAddress = &( xSet.pxLastAddress );
315315

316-
uint16_t usType = 0U;
317-
uint16_t usClass = 0U;
316+
#if ( ipconfigUSE_LLMNR == 1 )
317+
uint16_t usType = 0U;
318+
uint16_t usClass = 0U;
319+
#endif /* ipconfigUSE_LLMNR */
318320

319321
#if ( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 )
320322
xSet.xDoStore = xExpected;
@@ -568,9 +570,13 @@
568570
pxAnswer->ucNameOffset = ( uint8_t ) ( xSet.pcRequestedName - ( char * ) pucNewBuffer );
569571

570572
#ifndef _lint
571-
vSetField16( pxAnswer, LLMNRAnswer_t, usType, xSet.usType ); /* Type A or AAAA: host */
572-
vSetField16( pxAnswer, LLMNRAnswer_t, usClass, dnsCLASS_IN ); /* 1: Class IN */
573-
vSetField32( pxAnswer, LLMNRAnswer_t, ulTTL, dnsLLMNR_TTL_VALUE );
573+
#if ( ipconfigUSE_LLMNR == 1 )
574+
{
575+
vSetField16( pxAnswer, LLMNRAnswer_t, usType, xSet.usType ); /* Type A or AAAA: host */
576+
vSetField16( pxAnswer, LLMNRAnswer_t, usClass, dnsCLASS_IN ); /* 1: Class IN */
577+
vSetField32( pxAnswer, LLMNRAnswer_t, ulTTL, dnsLLMNR_TTL_VALUE );
578+
}
579+
#endif /* ipconfigUSE_LLMNR */
574580
#endif /* lint */
575581

576582
usLength = ( int16_t ) ( sizeof( *pxAnswer ) + ( size_t ) ( xSet.pucByte - pucNewBuffer ) );
@@ -628,9 +634,6 @@
628634
/* The IP-address found will be returned. */
629635
}
630636

631-
( void ) usType;
632-
( void ) usClass;
633-
634637
return ulIPAddress;
635638
}
636639

@@ -1041,14 +1044,10 @@
10411044
uint8_t ucNBNSName[ 17 ];
10421045
uint8_t * pucUDPPayloadBuffer = pucPayload;
10431046
NetworkBufferDescriptor_t * pxNetworkBuffer;
1044-
size_t uxBytesNeeded = sizeof( UDPPacket_t ) + sizeof( NBNSRequest_t );
10451047
NetworkEndPoint_t xEndPoint;
1046-
BaseType_t xMustReply = pdFALSE;
10471048

10481049
/* Not used for now */
10491050
( void ) uxBufferLength;
1050-
( void ) uxBytesNeeded;
1051-
( void ) xMustReply;
10521051

10531052
/* Read the request flags in host endianness. */
10541053
usFlags = usChar2u16( &( pucUDPPayloadBuffer[ offsetof( NBNSRequest_t, usFlags ) ] ) );

source/FreeRTOS_TCP_Utils_IPV6.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
uint32_t ulMSS = ipconfigTCP_MSS;
5959

6060
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
61-
char cBuffer[ 40 ];
61+
char cIPv6Address [ 40 ];
6262
#endif
6363

6464
const NetworkEndPoint_t * pxEndPoint = pxSocket->pxEndPoint;
@@ -92,8 +92,8 @@
9292

9393
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
9494
{
95-
( void ) FreeRTOS_inet_ntop( FREERTOS_AF_INET6, ( const void * ) pxSocket->u.xTCP.xRemoteIP.xIP_IPv6.ucBytes, cBuffer, sizeof( cBuffer ) );
96-
FreeRTOS_debug_printf( ( "prvSocketSetMSS: %u bytes for %s ip port %u\n", ( unsigned ) ulMSS, cBuffer, pxSocket->u.xTCP.usRemotePort ) );
95+
( void ) FreeRTOS_inet_ntop( FREERTOS_AF_INET6, ( const void * ) pxSocket->u.xTCP.xRemoteIP.xIP_IPv6.ucBytes, cIPv6Address , sizeof( cIPv6Address ) );
96+
FreeRTOS_debug_printf( ( "prvSocketSetMSS: %u bytes for %s ip port %u\n", ( unsigned ) ulMSS, cIPv6Address , pxSocket->u.xTCP.usRemotePort ) );
9797
}
9898
#endif
9999

test/build-combination/Common/main.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -210,37 +210,7 @@ void vApplicationIdleHook( void )
210210

211211
/* Exit. Just a stub. */
212212
}
213-
/*-----------------------------------------------------------*/
214-
void vAssertCalled( const char * pcFile,
215-
unsigned long ulLine )
216-
{
217-
const uint32_t ulLongSleep = 1000UL;
218-
volatile uint32_t ulBlockVariable = 0UL;
219-
volatile char * pcFileName = ( volatile char * ) pcFile;
220-
volatile uint32_t ulLineNumber = ulLine;
221213

222-
( void ) pcFileName;
223-
( void ) ulLineNumber;
224-
225-
taskDISABLE_INTERRUPTS();
226-
{
227-
while( 1 )
228-
{
229-
}
230-
}
231-
taskENABLE_INTERRUPTS();
232-
}
233-
/*-----------------------------------------------------------*/
234-
235-
void vLoggingPrintf( const char * pcFormat,
236-
... )
237-
{
238-
va_list arg;
239-
240-
va_start( arg, pcFormat );
241-
vprintf( pcFormat, arg );
242-
va_end( arg );
243-
}
244214
/*-----------------------------------------------------------*/
245215

246216
void getUserCmd( char * pucUserCmd )

0 commit comments

Comments
 (0)