Changeset 1713
- Timestamp:
- 09/11/10 15:41:02 (3 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 3 modified
-
rec_channel_rec.cc (modified) (1 diff)
-
recursor_cache.cc (modified) (1 diff)
-
syncres.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/rec_channel_rec.cc
r1683 r1713 111 111 112 112 113 static uint64_t dumpNegCache(SyncRes::negcache_t& negcache, int fd) 114 { 115 FILE* fp=fdopen(dup(fd), "w"); 116 if(!fp) { // dup probably failed 117 return 0; 118 } 119 fprintf(fp, "; negcache dump from thread follows\n;\n"); 120 time_t now = time(0); 121 122 typedef SyncRes::negcache_t::nth_index<1>::type sequence_t; 123 sequence_t& sidx=negcache.get<1>(); 124 125 uint64_t count=0; 126 BOOST_FOREACH(const NegCacheEntry& neg, sidx) 127 { 128 ++count; 129 fprintf(fp, "%s IN %s %d VIA %s\n", neg.d_name.c_str(), neg.d_qtype.getName().c_str(), (unsigned int) (neg.d_ttd - now), neg.d_qname.c_str()); 130 } 131 fclose(fp); 132 return count; 133 } 134 113 135 static uint64_t* pleaseDump(int fd) 114 136 { 115 return new uint64_t(t_RC->doDump(fd) );137 return new uint64_t(t_RC->doDump(fd) + dumpNegCache(t_sstorage->negcache, fd)); 116 138 } 117 139 -
trunk/pdns/pdns/recursor_cache.cc
r1705 r1713 328 328 return 0; 329 329 } 330 fprintf(fp, "; dump from thread follows\n;\n");330 fprintf(fp, "; main record cache dump from thread follows\n;\n"); 331 331 typedef cache_t::nth_index<1>::type sequence_t; 332 332 sequence_t& sidx=d_cache.get<1>(); -
trunk/pdns/pdns/syncres.cc
r1705 r1713 662 662 } 663 663 } 664 665 664 666 665 set<DNSResourceRecord> cset;