1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00

Generic netif status callback and mDNS (#8705)

* sprinkle IPAddress(...).isSet() across our loops to avoid polling on a
  stopped interface. status callback and netif_is_up **does not
  guarantee and we could use the interface**!
* register *one* status callback per instance, e.g. when begin() is called
  multiple times (also notice a subtle issue with schedule function when
  instance is delete'ed)
* consistent LwipIntf callback signature. no need for rvalue, just pass
  stdfunc as-is and let the compiler figure it out
This commit is contained in:
Max Prokhorov
2022-11-01 03:01:40 +03:00
committed by GitHub
parent 78444a5037
commit 04494f0729
6 changed files with 71 additions and 41 deletions

View File

@ -2228,7 +2228,7 @@ namespace MDNSImplementation
stcMDNS_RRDomain reverseIP4Domain;
for (netif* pNetIf = netif_list; pNetIf; pNetIf = pNetIf->next)
{
if (netif_is_up(pNetIf))
if (netif_is_up(pNetIf) && IPAddress(pNetIf->ip_addr).isSet())
{
if ((_buildDomainForReverseIP4(pNetIf->ip_addr, reverseIP4Domain))
&& (p_RRHeader.m_Domain == reverseIP4Domain))