File tree 2 files changed +7
-8
lines changed
libraries/ESP8266mDNS/src
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1030,6 +1030,8 @@ class MDNSResponder
1030
1030
esp8266::polledTimeout::oneShotMs m_TTLTimeout;
1031
1031
timeoutLevel_t m_timeoutLevel;
1032
1032
1033
+ using timeoutBase = decltype(m_TTLTimeout);
1034
+
1033
1035
stcTTL (void );
1034
1036
bool set (uint32_t p_u32TTL);
1035
1037
@@ -1039,7 +1041,7 @@ class MDNSResponder
1039
1041
bool prepareDeletion (void );
1040
1042
bool finalTimeoutLevel (void ) const ;
1041
1043
1042
- unsigned long timeout (void ) const ;
1044
+ timeoutBase::timeType timeout (void ) const ;
1043
1045
};
1044
1046
#ifdef MDNS_IP4_SUPPORT
1045
1047
/* *
Original file line number Diff line number Diff line change @@ -1663,22 +1663,19 @@ bool MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcTTL::finalTimeoutLevel(vo
1663
1663
/*
1664
1664
MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcTTL::timeout
1665
1665
*/
1666
- unsigned long MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcTTL::timeout (void ) const
1666
+ MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcTTL::timeoutBase::timeType MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcTTL::timeout (void ) const
1667
1667
{
1668
-
1669
- unsigned long timeout = esp8266::polledTimeout::oneShotMs::neverExpires;
1670
-
1671
1668
if (TIMEOUTLEVEL_BASE == m_timeoutLevel) // 80%
1672
1669
{
1673
- timeout = (m_u32TTL * 800L ); // to milliseconds
1670
+ return (m_u32TTL * 800L ); // to milliseconds
1674
1671
}
1675
1672
else if ((TIMEOUTLEVEL_BASE < m_timeoutLevel) && // >80% AND
1676
1673
(TIMEOUTLEVEL_FINAL >= m_timeoutLevel)) // <= 100%
1677
1674
{
1678
1675
1679
- timeout = (m_u32TTL * 50L );
1676
+ return (m_u32TTL * 50L );
1680
1677
} // else: invalid
1681
- return timeout ;
1678
+ return MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcTTL::timeoutBase::neverExpires ;
1682
1679
}
1683
1680
1684
1681
You can’t perform that action at this time.
0 commit comments