fix(mdns): Fixed build issues for targets without WiFi caps

This commit is contained in:
David Cermak
2024-03-01 10:24:29 +01:00
parent 45b1597ac3
commit 302b46f8e2
3 changed files with 5 additions and 16 deletions

View File

@ -26,7 +26,7 @@ jobs:
. ${IDF_PATH}/export.sh . ${IDF_PATH}/export.sh
python -m pip install idf-build-apps python -m pip install idf-build-apps
# Build default configs for all targets # Build default configs for all targets
python ./ci/build_apps.py components/mdns/${{ matrix.test.path }} -r default -m components/mdns/.build-test-rules.yml -d python ./ci/build_apps.py components/mdns/${{ matrix.test.path }} -r default -d
# Build specific configs for test targets # Build specific configs for test targets
python ./ci/build_apps.py components/mdns/${{ matrix.test.path }} python ./ci/build_apps.py components/mdns/${{ matrix.test.path }}
cd components/mdns/${{ matrix.test.path }} cd components/mdns/${{ matrix.test.path }}

View File

@ -1,11 +0,0 @@
components/mdns/examples:
disable:
- if: IDF_TARGET in ["esp32h2"]
components/mdns/tests/unit_test:
disable:
- if: IDF_TARGET in ["esp32h2"]
components/mdns/tests/test_apps:
disable:
- if: IDF_TARGET in ["esp32h2"]

View File

@ -5386,13 +5386,13 @@ static inline void set_default_duplicated_interfaces(void)
static inline void unregister_predefined_handlers(void) static inline void unregister_predefined_handlers(void)
{ {
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP) #if MDNS_ESP_WIFI_ENABLED && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event); esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
#endif #endif
#if CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP || CONFIG_MDNS_PREDEF_NETIF_ETH #if CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP || CONFIG_MDNS_PREDEF_NETIF_ETH
esp_event_handler_unregister(IP_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event); esp_event_handler_unregister(IP_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
#endif #endif
#if defined(CONFIG_ETH_ENABLED) && CONFIG_MDNS_PREDEF_NETIF_ETH #if CONFIG_ETH_ENABLED && CONFIG_MDNS_PREDEF_NETIF_ETH
esp_event_handler_unregister(ETH_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event); esp_event_handler_unregister(ETH_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
#endif #endif
} }
@ -5483,7 +5483,7 @@ esp_err_t mdns_init(void)
goto free_queue; goto free_queue;
} }
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP) #if MDNS_ESP_WIFI_ENABLED && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
if ((err = esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) { if ((err = esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) {
goto free_event_handlers; goto free_event_handlers;
} }
@ -5493,7 +5493,7 @@ esp_err_t mdns_init(void)
goto free_event_handlers; goto free_event_handlers;
} }
#endif #endif
#if defined(CONFIG_ETH_ENABLED) && CONFIG_MDNS_PREDEF_NETIF_ETH #if CONFIG_ETH_ENABLED && CONFIG_MDNS_PREDEF_NETIF_ETH
if ((err = esp_event_handler_register(ETH_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) { if ((err = esp_event_handler_register(ETH_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) {
goto free_event_handlers; goto free_event_handlers;
} }