Changeset 987
- Timestamp:
- 03/24/07 22:34:32 (6 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 4 modified
-
backends/bind/bindbackend2.cc (modified) (6 diffs)
-
backends/bind/bindbackend2.hh (modified) (1 diff)
-
distributor.hh (modified) (3 diffs)
-
utility.hh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/backends/bind/bindbackend2.cc
r984 r987 384 384 string Bind2Backend::DLReloadNowHandler(const vector<string>&parts, Utility::pid_t ppid) 385 385 { 386 shared_ptr<State> state = s_state; 386 387 ostringstream ret; 387 388 388 389 for(vector<string>::const_iterator i=parts.begin()+1;i<parts.end();++i) { 389 if(s_state->name_id_map.count(*i)) { 390 shared_ptr<State> state=s_state; 390 if(state->name_id_map.count(*i)) { 391 391 BB2DomainInfo& bbd=state->id_zone_map[state->name_id_map[*i]]; 392 392 … … 406 406 { 407 407 ostringstream ret; 408 shared_ptr<State> state = s_state;; 409 408 410 if(parts.size() > 1) { 409 411 for(vector<string>::const_iterator i=parts.begin()+1;i<parts.end();++i) { 410 shared_ptr<State> state = s_state;;411 412 if(state->name_id_map.count(*i)) { 412 413 BB2DomainInfo& bbd=state->id_zone_map[state->name_id_map[*i]]; // XXX s_name_id_map needs trick as well … … 418 419 } 419 420 else 420 for(id_zone_map_t::iterator i= us->s_state->id_zone_map.begin(); i!=us->s_state->id_zone_map.end(); ++i)421 for(id_zone_map_t::iterator i=state->id_zone_map.begin(); i!=state->id_zone_map.end(); ++i) 421 422 ret<< i->second.d_name << ": "<< (i->second.d_loaded ? "": "[rejected]") <<"\t"<<i->second.d_status<<"\n"; 422 423 … … 430 431 string Bind2Backend::DLListRejectsHandler(const vector<string>&parts, Utility::pid_t ppid) 431 432 { 433 shared_ptr<State> state = s_state; 434 432 435 ostringstream ret; 433 for(id_zone_map_t::iterator j =us->s_state->id_zone_map.begin(); j!=us->s_state->id_zone_map.end(); ++j)436 for(id_zone_map_t::iterator j = state->id_zone_map.begin(); j != state->id_zone_map.end(); ++j) 434 437 if(!j->second.d_loaded) 435 438 ret<<j->second.d_name<<"\t"<<j->second.d_status<<endl; … … 487 490 throw; 488 491 } 489 490 491 492 492 493 vector<BindDomainInfo> domains=BP.getDomains(); … … 646 647 { 647 648 bbd->d_loaded=0; // block further access 648 bbd->d_records ->clear(); // empty the vector of Bind2DNSRecords649 bbd->d_records = shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>); 649 650 } 650 651 -
trunk/pdns/pdns/backends/bind/bindbackend2.hh
r959 r987 112 112 bool abortTransaction(); 113 113 114 typedef map<string, int> name_id_map_t; 114 115 typedef map<uint32_t, BB2DomainInfo> id_zone_map_t; 115 typedef map<string,int> name_id_map_t;116 116 117 117 struct State -
trunk/pdns/pdns/distributor.hh
r954 r987 80 80 } 81 81 82 83 84 85 82 struct QuestionData 86 83 { … … 91 88 }; 92 89 93 94 90 typedef pair<QuestionData, AnswerData> tuple_t; 95 91 … … 179 175 pthread_mutex_unlock(&us->q_lock); 180 176 Answer *a; 181 182 177 183 178 #ifndef SMTPREDIR -
trunk/pdns/pdns/utility.hh
r972 r987 118 118 //! Retrieves the semaphore value. 119 119 int getValue( Semaphore::sem_value_t *sval ); 120 121 120 }; 122 121