mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-24 19:42:27 +03:00
LEAmDNS Fixes (#5641)
- Better separation of ESP wifi thread code from user thread code - Added a flag for 'update()'-less use (disabled by default) - The too fast updates for service queries are fixed - Switched fully to PolledTimeout; LEATimeFlag not needed anymore (BTW: a const 'expired()' method would be helpful) - The device should stay visible now even after the first TTL timeout - Improved service querying (queries five times now) - Fixed TTL (bug introduced with Fixes 1.0)
This commit is contained in:
committed by
david gauchard
parent
e9a6fd2f82
commit
a89ab24edc
@ -1439,8 +1439,7 @@ bool MDNSResponder::_writeMDNSAnswer_PTR_TYPE(MDNSResponder::stcMDNSService& p_r
|
||||
|
||||
stcMDNS_RRDomain dnssdDomain;
|
||||
stcMDNS_RRDomain serviceDomain;
|
||||
stcMDNS_RRAttributes attributes(DNS_RRTYPE_PTR,
|
||||
((p_rSendParameter.m_bCacheFlush ? 0x8000 : 0) | DNS_RRCLASS_IN)); // Cache flush? & INternet
|
||||
stcMDNS_RRAttributes attributes(DNS_RRTYPE_PTR, DNS_RRCLASS_IN); // No cache flush! only INternet
|
||||
bool bResult = ((_buildDomainForDNSSD(dnssdDomain)) && // _services._dns-sd._udp.local
|
||||
(_writeMDNSRRDomain(dnssdDomain, p_rSendParameter)) &&
|
||||
(_writeMDNSRRAttributes(attributes, p_rSendParameter)) && // TYPE & CLASS
|
||||
@ -1465,8 +1464,7 @@ bool MDNSResponder::_writeMDNSAnswer_PTR_NAME(MDNSResponder::stcMDNSService& p_r
|
||||
MDNSResponder::stcMDNSSendParameter& p_rSendParameter) {
|
||||
DEBUG_EX_INFO(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _writeMDNSAnswer_PTR_NAME\n")););
|
||||
|
||||
stcMDNS_RRAttributes attributes(DNS_RRTYPE_PTR,
|
||||
((p_rSendParameter.m_bCacheFlush ? 0x8000 : 0) | DNS_RRCLASS_IN)); // Cache flush? & INternet
|
||||
stcMDNS_RRAttributes attributes(DNS_RRTYPE_PTR, DNS_RRCLASS_IN); // No cache flush! only INternet
|
||||
bool bResult = ((_writeMDNSServiceDomain(p_rService, false, false, p_rSendParameter)) && // _http._tcp.local
|
||||
(_writeMDNSRRAttributes(attributes, p_rSendParameter)) && // TYPE & CLASS
|
||||
(_write32((p_rSendParameter.m_bUnannounce ? 0 : MDNS_SERVICE_TTL), p_rSendParameter)) && // TTL
|
||||
|
Reference in New Issue
Block a user