Skip to content

Commit 302b46f

Browse files
committed
fix(mdns): Fixed build issues for targets without WiFi caps
1 parent 45b1597 commit 302b46f

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

.github/workflows/mdns__build-target-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
. ${IDF_PATH}/export.sh
2727
python -m pip install idf-build-apps
2828
# Build default configs for all targets
29-
python ./ci/build_apps.py components/mdns/${{ matrix.test.path }} -r default -m components/mdns/.build-test-rules.yml -d
29+
python ./ci/build_apps.py components/mdns/${{ matrix.test.path }} -r default -d
3030
# Build specific configs for test targets
3131
python ./ci/build_apps.py components/mdns/${{ matrix.test.path }}
3232
cd components/mdns/${{ matrix.test.path }}

components/mdns/.build-test-rules.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

components/mdns/mdns.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5386,13 +5386,13 @@ static inline void set_default_duplicated_interfaces(void)
53865386

53875387
static inline void unregister_predefined_handlers(void)
53885388
{
5389-
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
5389+
#if MDNS_ESP_WIFI_ENABLED && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
53905390
esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
53915391
#endif
53925392
#if CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP || CONFIG_MDNS_PREDEF_NETIF_ETH
53935393
esp_event_handler_unregister(IP_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
53945394
#endif
5395-
#if defined(CONFIG_ETH_ENABLED) && CONFIG_MDNS_PREDEF_NETIF_ETH
5395+
#if CONFIG_ETH_ENABLED && CONFIG_MDNS_PREDEF_NETIF_ETH
53965396
esp_event_handler_unregister(ETH_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
53975397
#endif
53985398
}
@@ -5483,7 +5483,7 @@ esp_err_t mdns_init(void)
54835483
goto free_queue;
54845484
}
54855485

5486-
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
5486+
#if MDNS_ESP_WIFI_ENABLED && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
54875487
if ((err = esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) {
54885488
goto free_event_handlers;
54895489
}
@@ -5493,7 +5493,7 @@ esp_err_t mdns_init(void)
54935493
goto free_event_handlers;
54945494
}
54955495
#endif
5496-
#if defined(CONFIG_ETH_ENABLED) && CONFIG_MDNS_PREDEF_NETIF_ETH
5496+
#if CONFIG_ETH_ENABLED && CONFIG_MDNS_PREDEF_NETIF_ETH
54975497
if ((err = esp_event_handler_register(ETH_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) {
54985498
goto free_event_handlers;
54995499
}

0 commit comments

Comments
 (0)