]> granicus.if.org Git - pdns/commitdiff
ixfrdist: Check the serial even if verbose is off
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 12 Feb 2018 14:26:00 +0000 (15:26 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 12 Feb 2018 14:26:00 +0000 (15:26 +0100)
pdns/ixfrdist.cc

index 45c8a3e67c2c870e91c52a29b5d16b233c648736..a0465633e7dc634bf4deaca13fa91b6cbac85ee3 100644 (file)
@@ -206,15 +206,19 @@ void updateThread() {
       try {
         lastCheck[domain] = now;
         auto newSerial = getSerialFromMaster(g_master, domain, sr); // TODO TSIG
-        if(g_soas.find(domain) != g_soas.end() && g_verbose) {
-          cerr<<"[INFO] Got SOA Serial for "<<domain<<" from "<<g_master.toStringWithPort()<<": "<< newSerial<<", had Serial: "<<g_soas[domain]->d_st.serial;
+        if(g_soas.find(domain) != g_soas.end()) {
+          if (g_verbose) {
+            cerr<<"[INFO] Got SOA Serial for "<<domain<<" from "<<g_master.toStringWithPort()<<": "<< newSerial<<", had Serial: "<<g_soas[domain]->d_st.serial;
+          }
           if (newSerial == g_soas[domain]->d_st.serial) {
             if (g_verbose) {
               cerr<<", not updating."<<endl;
             }
             continue;
           }
-          cerr<<", will update."<<endl;
+          if (g_verbose) {
+            cerr<<", will update."<<endl;
+          }
         }
       } catch (runtime_error &e) {
         cerr<<"[WARNING] Unable to get SOA serial update for '"<<domain<<"': "<<e.what()<<endl;