File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
test/unit-test/FreeRTOS_IP_Utils Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ void vCheckNetworkTimers( void )
328328 }
329329 }
330330
331- xAllNetworksUp = xUp ;
331+ vSetAllNetworksUp ( xUp ) ;
332332 }
333333 }
334334}
@@ -606,11 +606,10 @@ void vIPSetARPResolutionTimerEnableState( BaseType_t xEnableState )
606606/*-----------------------------------------------------------*/
607607
608608/**
609- * @brief Mark that at least one interface is down so that the 'xNetworkTimer' is checked.
610- * Whenever the timer expires, all interfaces that are down will get a new NetworkDown
611- * event.
609+ * @brief Mark whether all interfaces are up or at least one interface is down.
610+ * If all interfaces are up, the 'xNetworkTimer' will not be checked.
612611 */
613- void vSetNotAllNetworksUp ( void )
612+ void vSetAllNetworksUp ( BaseType_t xIsAllNetworksUp )
614613{
615- xAllNetworksUp = pdFALSE ;
614+ xAllNetworksUp = xIsAllNetworksUp ;
616615}
Original file line number Diff line number Diff line change @@ -961,7 +961,8 @@ void prvProcessNetworkDownEvent( struct xNetworkInterface * pxInterface )
961961 }
962962 else
963963 {
964- vSetNotAllNetworksUp ();
964+ /* At least one interface is down. */
965+ vSetAllNetworksUp ( pdFALSE );
965966
966967 /* Nothing else to do. When the 'xNetworkTimer' expires, all interfaces
967968 * with bits.bInterfaceUp cleared will get a new 'eNetworkDownEvent' */
Original file line number Diff line number Diff line change @@ -882,8 +882,8 @@ BaseType_t xIsCallingFromIPTask( void );
882882/* Send the network-up event and start the ARP timer. */
883883void vIPNetworkUpCalls ( struct xNetworkEndPoint * pxEndPoint );
884884
885- /* Mark that at least one interface is down to trigger repeated NetworkDown events . */
886- void vSetNotAllNetworksUp ( void );
885+ /* Mark whether all interfaces are up or at least one interface is down. */
886+ void vSetAllNetworksUp ( BaseType_t xIsAllNetworksUp );
887887
888888/* *INDENT-OFF* */
889889#ifdef __cplusplus
Original file line number Diff line number Diff line change @@ -581,7 +581,7 @@ void test_prvProcessNetworkDownEvent_InterfaceInitFail( void )
581581
582582 vDHCPStop_Expect ( & xEndPoint );
583583
584- vSetNotAllNetworksUp_Expect ( );
584+ vSetAllNetworksUp_Expect ( pdFALSE );
585585
586586 prvProcessNetworkDownEvent ( & xInterface );
587587}
You can’t perform that action at this time.
0 commit comments