Changeset 819 for trunk/pdns/pdns/syncres.cc
- Timestamp:
- 05/05/06 09:33:37 (7 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/syncres.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/syncres.cc
r802 r819 700 700 DNSResourceRecord rr=*i; 701 701 rr.d_place=DNSResourceRecord::ANSWER; 702 // if(rr.ttl < 5)702 // if(rr.ttl < 5) 703 703 // rr.ttl=60; 704 rr.ttl+=d_now.tv_sec; 704 705 rr.ttl += d_now.tv_sec; 705 706 if(rr.qtype.getCode() == QType::NS) // people fiddle with the case 706 707 rr.content=toLower(rr.content); // this must stay! … … 714 715 // supplant 715 716 for(tcache_t::const_iterator i=tcache.begin();i!=tcache.end();++i) { 717 if(i->second.size() > 1) { 718 uint32_t lowestTTL=numeric_limits<uint32_t>::max(); 719 for(tcache_t::value_type::second_type::iterator j=i->second.begin(); j != i->second.end(); ++j) 720 lowestTTL=min(lowestTTL, j->ttl); 721 722 for(tcache_t::value_type::second_type::iterator j=i->second.begin(); j != i->second.end(); ++j) 723 ((tcache_t::value_type::second_type::value_type*)&(*j))->ttl=lowestTTL; 724 } 725 716 726 RC.replace(i->first.first, i->first.second, i->second); 717 727 }