Skip to content

Commit

Permalink
Missing DNS callbacks (#1206)
Browse files Browse the repository at this point in the history
* Removes the code that needlessly clears the DNS callback list.
This code is causing DNS callbacks to not get called when the queries time out.

* Fix unit tests

---------

Co-authored-by: Emil Popov <[email protected]>
Co-authored-by: tony-josi-aws <[email protected]>
  • Loading branch information
3 people authored Nov 21, 2024
1 parent 1599660 commit 5f41a38
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions source/FreeRTOS_IP.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,15 +670,6 @@ void vIPNetworkUpCalls( struct xNetworkEndPoint * pxEndPoint )
#endif
#endif /* ipconfigUSE_NETWORK_EVENT_HOOK */

#if ( ipconfigDNS_USE_CALLBACKS != 0 )
{
/* The following function is declared in FreeRTOS_DNS.c and 'private' to
* this library */
extern void vDNSInitialise( void );
vDNSInitialise();
}
#endif /* ipconfigDNS_USE_CALLBACKS != 0 */

/* Set remaining time to 0 so it will become active immediately. */
if( pxEndPoint->bits.bIPv6 == pdTRUE_UNSIGNED )
{
Expand Down
2 changes: 0 additions & 2 deletions test/unit-test/FreeRTOS_IP/FreeRTOS_IP_utest.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ void test_vIPNetworkUpCalls( void )
xEndPoint.bits.bIPv6 = pdFALSE;

vApplicationIPNetworkEventHook_Multi_Expect( eNetworkUp, &xEndPoint );
vDNSInitialise_Expect();
vARPTimerReload_Expect( pdMS_TO_TICKS( 10000 ) );

vIPNetworkUpCalls( &xEndPoint );
Expand Down Expand Up @@ -4369,7 +4368,6 @@ static void prvIPNetworkUpCalls_Generic( const uint8_t * pucAddress,
}

vApplicationIPNetworkEventHook_Multi_Expect( eNetworkUp, &xEndPoint );
vDNSInitialise_Expect();

if( xEndPoint.bits.bIPv6 == pdTRUE_UNSIGNED )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ void test_vIPNetworkUpCalls_BackwardCompatible( void )
NetworkEndPoint_t xEndPoint = { 0 };

vApplicationIPNetworkEventHook_Expect( eNetworkUp );
vDNSInitialise_Expect();
vARPTimerReload_Expect( pdMS_TO_TICKS( 10000 ) );

vIPNetworkUpCalls( &xEndPoint );
Expand Down

0 comments on commit 5f41a38

Please sign in to comment.