Skip to content

Commit

Permalink
Don't stop checking the Network Timer
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa committed Sep 25, 2023
1 parent 5058d3f commit f5d8d98
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions source/FreeRTOS_IP_Timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@
#include "NetworkBufferManagement.h"
#include "FreeRTOS_Routing.h"
#include "FreeRTOS_DNS.h"
/*-----------------------------------------------------------*/

/** @brief 'xAllNetworksUp' becomes pdTRUE as soon as all network interfaces have
* been initialised. */
/* MISRA Ref 8.9.1 [File scoped variables] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-89 */
/* coverity[misra_c_2012_rule_8_9_violation] */
static BaseType_t xAllNetworksUp = pdFALSE;

/*-----------------------------------------------------------*/

/*
* Utility functions for the light weight IP timers.
Expand Down Expand Up @@ -313,22 +303,14 @@ void vCheckNetworkTimers( void )
#endif /* ipconfigUSE_TCP == 1 */

/* Is it time to trigger the repeated NetworkDown events? */
if( xAllNetworksUp == pdFALSE )
if( prvIPTimerCheck( &( xNetworkTimer ) ) != pdFALSE )
{
if( prvIPTimerCheck( &( xNetworkTimer ) ) != pdFALSE )
for( pxInterface = pxNetworkInterfaces; pxInterface != NULL; pxInterface = pxInterface->pxNext )
{
BaseType_t xUp = pdTRUE;

for( pxInterface = pxNetworkInterfaces; pxInterface != NULL; pxInterface = pxInterface->pxNext )
if( pxInterface->bits.bInterfaceUp == pdFALSE_UNSIGNED )
{
if( pxInterface->bits.bInterfaceUp == pdFALSE_UNSIGNED )
{
xUp = pdFALSE;
FreeRTOS_NetworkDown( pxInterface );
}
FreeRTOS_NetworkDown( pxInterface );
}

xAllNetworksUp = xUp;
}
}
}
Expand Down

0 comments on commit f5d8d98

Please sign in to comment.