Merge branch 'bugfix/mdns_BCT_fix_v4.0' into 'release/v4.0'

mdns: fixes to have the BCT passing with latest IDF/lw-IP (v4.0)

See merge request espressif/esp-idf!6454
This commit is contained in:
Jiang Jiang Jian 2019-11-02 17:17:38 +08:00
commit 0ca0e7d3cc

View file

@ -3062,7 +3062,7 @@ static void _mdns_handle_system_event(esp_event_base_t event_base,
switch(event_id) { switch(event_id) {
case WIFI_EVENT_STA_CONNECTED: case WIFI_EVENT_STA_CONNECTED:
if (!tcpip_adapter_dhcpc_get_status(TCPIP_ADAPTER_IF_STA, &dcst)) { if (!tcpip_adapter_dhcpc_get_status(TCPIP_ADAPTER_IF_STA, &dcst)) {
if (dcst != TCPIP_ADAPTER_DHCP_STARTED) { if (dcst == TCPIP_ADAPTER_DHCP_STOPPED) {
_mdns_enable_pcb(TCPIP_ADAPTER_IF_STA, MDNS_IP_PROTOCOL_V4); _mdns_enable_pcb(TCPIP_ADAPTER_IF_STA, MDNS_IP_PROTOCOL_V4);
} }
} }
@ -3085,7 +3085,7 @@ static void _mdns_handle_system_event(esp_event_base_t event_base,
switch (event_id) { switch (event_id) {
case ETHERNET_EVENT_CONNECTED: case ETHERNET_EVENT_CONNECTED:
if (!tcpip_adapter_dhcpc_get_status(TCPIP_ADAPTER_IF_ETH, &dcst)) { if (!tcpip_adapter_dhcpc_get_status(TCPIP_ADAPTER_IF_ETH, &dcst)) {
if (dcst != TCPIP_ADAPTER_DHCP_STARTED) { if (dcst == TCPIP_ADAPTER_DHCP_STOPPED) {
_mdns_enable_pcb(TCPIP_ADAPTER_IF_ETH, MDNS_IP_PROTOCOL_V4); _mdns_enable_pcb(TCPIP_ADAPTER_IF_ETH, MDNS_IP_PROTOCOL_V4);
} }
} }