Changeset 999
- Timestamp:
- 03/26/07 22:18:23 (2 years ago)
- Files:
-
- trunk/pdns/pdns/Makefile-recursor (modified) (1 diff)
- trunk/pdns/pdns/backends/bind/bindbackend2.cc (modified) (3 diffs)
- trunk/pdns/pdns/backends/bind/bindbackend2.hh (modified) (3 diffs)
- trunk/pdns/pdns/backends/bind/bindparser.hh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pdns/pdns/Makefile-recursor
r752 r999 4 4 CONFIGDIR="/etc/powerdns/" 5 5 OPTFLAGS?=-O3 6 CXXFLAGS:= $(CXXFLAGS) -Wall $(OPTFLAGS) $(PROFILEFLAGS)6 CXXFLAGS:= $(CXXFLAGS) -Wall -DBOOST_SP_DISABLE_THREADS $(OPTFLAGS) $(PROFILEFLAGS) 7 7 CFLAGS:=$(CFLAGS) -Wall $(OPTFLAGS) $(PROFILEFLAGS) 8 8 LINKCC=$(CXX) trunk/pdns/pdns/backends/bind/bindbackend2.cc
r987 r999 455 455 return; 456 456 } 457 458 457 s_first=0; 459 458 s_state = shared_ptr<State>(new State); … … 465 464 dl->registerFunc("BIND-DOMAIN-STATUS", &DLDomStatusHandler); 466 465 dl->registerFunc("BIND-LIST-REJECTS", &DLListRejectsHandler); 466 } 467 468 Bind2Backend::~Bind2Backend() 469 { 470 if(us==this) { 471 L<<Logger::Error<<"Main bind2backend instance being destructed"<<endl; 472 exit(1); 473 } 467 474 } 468 475 … … 630 637 set_difference(newnames.begin(), newnames.end(), oldnames.begin(), oldnames.end(), back_inserter(diff2)); 631 638 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! 634 641 635 642 // report trunk/pdns/pdns/backends/bind/bindbackend2.hh
r987 r999 28 28 using namespace std; 29 29 using namespace boost; 30 31 30 32 31 /** This struct is used within the Bind2Backend to store DNS information. … … 91 90 public: 92 91 Bind2Backend(const string &suffix=""); //!< Makes our connection to the database. Calls exit(1) if it fails. 92 ~Bind2Backend(); 93 93 void getUnfreshSlaveInfos(vector<DomainInfo> *unfreshDomains); 94 94 void getUpdatedMasters(vector<DomainInfo> *changedDomains); 95 95 bool getDomainInfo(const string &domain, DomainInfo &di); 96 96 time_t getCtime(const string &fname); 97 98 97 99 98 void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1); … … 115 114 typedef map<uint32_t, BB2DomainInfo> id_zone_map_t; 116 115 117 struct State 116 struct State : public boost::noncopyable 118 117 { 119 118 name_id_map_t name_id_map; //!< convert a name to a domain id trunk/pdns/pdns/backends/bind/bindparser.hh
r681 r999 39 39 40 40 extern const char *bind_directory; 41 extern FILE *yyin; 41 42 class BindParser 42 43 { 43 44 public: 44 BindParser() : d_dir("."), d_verbose(false) 45 BindParser() : d_dir("."), d_verbose(false) 45 46 { 47 yyin=0; 46 48 extern int include_stack_ptr; 47 49 include_stack_ptr=0; 48 50 49 51 bind_directory=d_dir.c_str(); 52 } 53 ~BindParser() 54 { 55 if(yyin) { 56 fclose(yyin); 57 yyin=0; 58 } 50 59 } 51 60 void parse(const string &fname);