From f5d8d98856a37bad9d10b003d770e0c0871d3a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sowa?= Date: Fri, 22 Sep 2023 14:38:41 +0200 Subject: [PATCH] Don't stop checking the Network Timer --- source/FreeRTOS_IP_Timers.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/source/FreeRTOS_IP_Timers.c b/source/FreeRTOS_IP_Timers.c index 709c9e5b8..1ab657416 100644 --- a/source/FreeRTOS_IP_Timers.c +++ b/source/FreeRTOS_IP_Timers.c @@ -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. @@ -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; } } }