Show
Ignore:
Timestamp:
03/26/07 22:18:23 (6 years ago)
Author:
ahu
Message:

speedup for pdns_recursor, fix crashes of BIND backend, fix filedescriptor leak in BIND backend

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/backends/bind/bindbackend2.cc

    r987 r999  
    455455    return; 
    456456  } 
    457     
    458457  s_first=0; 
    459458  s_state = shared_ptr<State>(new State); 
     
    465464  dl->registerFunc("BIND-DOMAIN-STATUS", &DLDomStatusHandler); 
    466465  dl->registerFunc("BIND-LIST-REJECTS", &DLListRejectsHandler); 
     466} 
     467 
     468Bind2Backend::~Bind2Backend() 
     469{ 
     470  if(us==this) { 
     471    L<<Logger::Error<<"Main bind2backend instance being destructed"<<endl; 
     472    exit(1); 
     473  } 
    467474} 
    468475 
     
    630637    set_difference(newnames.begin(), newnames.end(), oldnames.begin(), oldnames.end(), back_inserter(diff2)); 
    631638    newdomains=diff2.size(); 
    632  
    633     s_state = staging; // and boy do we hope this is a threadsafe operation! 
     639     
     640    s_state.swap(staging); // and boy do we hope this is a threadsafe operation! 
    634641 
    635642    // report