Changeset 631 for trunk/pdns/pdns/pdns_recursor.cc
- Timestamp:
- 03/27/06 00:16:00 (7 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/pdns_recursor.cc (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/pdns_recursor.cc
r628 r631 32 32 #include "mtasker.hh" 33 33 #include <utility> 34 #include "dnspacket.hh"35 34 #include "statbag.hh" 36 35 #include "arguments.hh" … … 48 47 #include "zoneparser-tng.hh" 49 48 #include "rec_channel.hh" 49 #include "logger.hh" 50 50 51 51 using namespace boost; … … 375 375 void makeControlChannelSocket() 376 376 { 377 s_rcc.listen( "pdns_recursor.controlsocket");377 s_rcc.listen(::arg()["socket-dir"]+"/pdns_recursor.controlsocket"); 378 378 } 379 379 … … 498 498 #endif 499 499 500 uint64_t counter , qcounter;500 uint64_t counter; 501 501 bool statsWanted; 502 502 … … 519 519 void doStats(void) 520 520 { 521 if( qcounter) {522 L<<Logger::Error<<"stats: "<< qcounter<<" questions, "<<RC.size()<<" cache entries, "<<SyncRes::s_negcache.size()<<" negative entries, "521 if(g_stats.qcounter) { 522 L<<Logger::Error<<"stats: "<<g_stats.qcounter<<" questions, "<<RC.size()<<" cache entries, "<<SyncRes::s_negcache.size()<<" negative entries, " 523 523 <<(int)((RC.cacheHits*100.0)/(RC.cacheHits+RC.cacheMisses))<<"% cache hits"<<endl; 524 524 L<<Logger::Error<<"stats: throttle map: "<<SyncRes::s_throttle.size()<<", ns speeds: " … … 834 834 string msg=s_rcc.recv(&remote); 835 835 RecursorControlParser rcp; 836 s_rcc.send(rcp.getAnswer(msg), &remote); 836 RecursorControlParser::func_t* command; 837 string answer=rcp.getAnswer(msg, &command); 838 s_rcc.send(answer, &remote); 839 command(); 837 840 } 838 841 … … 877 880 L<<Logger::Error<<"Ignoring answer on server socket!"<<endl; 878 881 else { 879 ++ qcounter;882 ++g_stats.qcounter; 880 883 dc->setSocket(*i); 881 884 dc->d_tcp=false; … … 1027 1030 L<<Logger::Error<<"Ignoring answer on server socket!"<<endl; 1028 1031 else { 1029 ++qcounter; 1032 ++g_stats.qcounter; 1033 ++g_stats.tcpqcounter; 1030 1034 MT->makeThread(startDoResolve, dc, "tcp"); 1031 1035 }