From 5f41a38049eddd3ea5c9a00dd6b1fbcd8ead456a Mon Sep 17 00:00:00 2001 From: Emil Popov Date: Thu, 21 Nov 2024 10:28:35 -0500 Subject: [PATCH] Missing DNS callbacks (#1206) * 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 Co-authored-by: tony-josi-aws --- source/FreeRTOS_IP.c | 9 --------- test/unit-test/FreeRTOS_IP/FreeRTOS_IP_utest.c | 2 -- .../FreeRTOS_IP_DiffConfig1_utest.c | 1 - 3 files changed, 12 deletions(-) diff --git a/source/FreeRTOS_IP.c b/source/FreeRTOS_IP.c index fded8c851..38e6e01d1 100644 --- a/source/FreeRTOS_IP.c +++ b/source/FreeRTOS_IP.c @@ -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 ) { diff --git a/test/unit-test/FreeRTOS_IP/FreeRTOS_IP_utest.c b/test/unit-test/FreeRTOS_IP/FreeRTOS_IP_utest.c index f6fa11343..ead009d05 100644 --- a/test/unit-test/FreeRTOS_IP/FreeRTOS_IP_utest.c +++ b/test/unit-test/FreeRTOS_IP/FreeRTOS_IP_utest.c @@ -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 ); @@ -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 ) { diff --git a/test/unit-test/FreeRTOS_IP_DiffConfig1/FreeRTOS_IP_DiffConfig1_utest.c b/test/unit-test/FreeRTOS_IP_DiffConfig1/FreeRTOS_IP_DiffConfig1_utest.c index 3a1652158..8bfbc625b 100644 --- a/test/unit-test/FreeRTOS_IP_DiffConfig1/FreeRTOS_IP_DiffConfig1_utest.c +++ b/test/unit-test/FreeRTOS_IP_DiffConfig1/FreeRTOS_IP_DiffConfig1_utest.c @@ -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 );