"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "recursor_cache.cc" between
pdns-recursor-4.5.1.tar.bz2 and pdns-recursor-4.5.2.tar.bz2

About: PowerDNS - a separate release of the PowerDNS Recursor (without the authoritative nameserver).

recursor_cache.cc  (pdns-recursor-4.5.1.tar.bz2):recursor_cache.cc  (pdns-recursor-4.5.2.tar.bz2)
skipping to change at line 258 skipping to change at line 258
return match; return match;
} }
// Fake a cache miss if more than refreshTTLPerc of the original TTL has passed // Fake a cache miss if more than refreshTTLPerc of the original TTL has passed
time_t MemRecursorCache::fakeTTD(MemRecursorCache::OrderedTagIterator_t& entry, const DNSName& qname, QType qtype, time_t ret, time_t now, uint32_t origTTL, boo l refresh) time_t MemRecursorCache::fakeTTD(MemRecursorCache::OrderedTagIterator_t& entry, const DNSName& qname, QType qtype, time_t ret, time_t now, uint32_t origTTL, boo l refresh)
{ {
time_t ttl = ret - now; time_t ttl = ret - now;
if (ttl > 0 && SyncRes::s_refresh_ttlperc > 0) { if (ttl > 0 && SyncRes::s_refresh_ttlperc > 0) {
const uint32_t deadline = origTTL * SyncRes::s_refresh_ttlperc / 100; const uint32_t deadline = origTTL * SyncRes::s_refresh_ttlperc / 100;
const bool almostExpired = static_cast<uint32_t>(ttl) <= deadline; const bool almostExpired = static_cast<uint32_t>(ttl) <= deadline;
if (almostExpired) { if (almostExpired && qname != g_rootdnsname) {
if (refresh) { if (refresh) {
return -1; return -1;
} else { } else {
if (!entry->d_submitted) { if (!entry->d_submitted) {
pushTask(qname, qtype, entry->d_ttd); pushTask(qname, qtype, entry->d_ttd);
entry->d_submitted = true; entry->d_submitted = true;
} }
} }
} }
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)