Skip to content

Commit

Permalink
Add return variable for IP_Init fucntions
Browse files Browse the repository at this point in the history
  • Loading branch information
kar-rahul-aws committed Aug 14, 2024
1 parent 0da3d86 commit 828c305
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ static UBaseType_t ulNextRand;

void main_tcp_echo_client_tasks( void )
{
BaseType_t xReturn;
const uint32_t ulLongTime_ms = pdMS_TO_TICKS( 1000UL );

/*
Expand Down Expand Up @@ -180,12 +181,13 @@ void main_tcp_echo_client_tasks( void )
}
#endif /* ( ipconfigUSE_DHCP != 0 ) */

FreeRTOS_IPInit_Multi();
xReturn = FreeRTOS_IPInit_Multi();
#else /* if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
/* Using the old /single /IPv4 library, or using backward compatible mode of the new /multi library. */
FreeRTOS_IPInit( ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
xReturn = FreeRTOS_IPInit( ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */

configASSERT( xReturn == pdTRUE );

/* Start the RTOS scheduler. */
FreeRTOS_debug_printf( ( "vTaskStartScheduler\n" ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ NetworkInterface_t * pxWinPcap_FillInterfaceDescriptor( BaseType_t xEMACIndex,

int main( void )
{
BaseType_t xReturn;
const uint32_t ulLongTime_ms = pdMS_TO_TICKS( 1000UL );

/*
Expand Down Expand Up @@ -314,7 +315,9 @@ int main( void )
}
#endif /* ( mainNETWORK_UP_COUNT >= 3U ) */

FreeRTOS_IPInit_Multi();
xReturn = FreeRTOS_IPInit_Multi();

configASSERT( xReturn == pdTRUE );

/* Start the RTOS scheduler. */
FreeRTOS_debug_printf( ( "vTaskStartScheduler\r\n" ) );
Expand Down

0 comments on commit 828c305

Please sign in to comment.