]> granicus.if.org Git - pdns/commitdiff
make sure we notice filename changes in the bind backend, closing ticket 228, reporte...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 5 Apr 2009 19:12:48 +0000 (19:12 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 5 Apr 2009 19:12:48 +0000 (19:12 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1347 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/backends/bind/bindbackend2.cc

index 8e52b783cf6b69c6857957de6c9d519f59c22cbe..03b74a3369fbc3ab79cf8ae6518d211cab4c9bea 100644 (file)
@@ -565,11 +565,13 @@ void Bind2Backend::loadConfig(string* status)
 
        // overwrite what we knew about the domain
        bbd->d_name=i->name;
+
+       bool filenameChanged = (bbd->d_filename!=i->filename);
        bbd->d_filename=i->filename;
        bbd->d_masters=i->masters;
        
-       if(!bbd->d_loaded || !bbd->current()) {
-         //      L<<Logger::Info<<d_logprefix<<" parsing '"<<i->name<<"' from file '"<<i->filename<<"'"<<endl;
+       if(filenameChanged || !bbd->d_loaded || !bbd->current()) {
+         L<<Logger::Info<<d_logprefix<<" parsing '"<<i->name<<"' from file '"<<i->filename<<"'"<<endl;
          
          try {
            // we need to allocate a new vector so we don't kill the original, which is still in use!
@@ -589,7 +591,7 @@ void Bind2Backend::loadConfig(string* status)
            staging->id_zone_map[bbd->d_id].setCtime();
            staging->id_zone_map[bbd->d_id].d_loaded=true; 
            staging->id_zone_map[bbd->d_id].d_status="parsed into memory at "+nowTime();
-
+           
            contents.clear();
            //  s_stage->id_zone_map[bbd->d_id].d_records->swap(*s_staging_zone_map[bbd->d_id].d_records);
          }