]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
manual merge of Aki Tuomi's pull request #1263. Thanks!
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 5 Feb 2014 10:35:33 +0000 (11:35 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 5 Feb 2014 10:35:33 +0000 (11:35 +0100)
pdns/common_startup.cc
pdns/dbdnsseckeeper.cc
pdns/dns.cc
pdns/dnssecsigner.cc
pdns/lwres.cc
pdns/signingpipe.cc
pdns/syncres.cc

index 7db509fb4d4c34948e9e893702b6f6c4841b49f8..f73afee0018202b5868dd79a8c975781fbb82ce6 100644 (file)
@@ -252,7 +252,7 @@ void *qthread(void *number)
 
   // If we have SO_REUSEPORT then create a new port for all receiver threads
   // other than the first one.
-  if( number > 0 && NS->canReusePort() ) {
+  if( number != NULL && NS->canReusePort() ) {
     L<<Logger::Notice<<"Starting new listen thread on the same IPs/ports using SO_REUSEPORT"<<endl;
     NS = new UDPNameserver( true );
   }
index 2e9110c659528dcc585dd0dd1dead8af02db997c..b7eada4bf5aae9f1b50bb5997a0f5021f87bc7dc 100644 (file)
@@ -67,8 +67,6 @@ bool DNSSECKeeper::isSecuredZone(const std::string& zone)
       else
         return true;
     }
-    else
-      ; 
   }  
   keyset_t keys = getKeys(zone, true); // does the cache
   
@@ -382,7 +380,7 @@ bool DNSSECKeeper::getPreRRSIGs(DNSBackend& db, const std::string& signer, const
                         rr.ttl = signTTL;
                         rrsigs.push_back(rr);
                 }
-                else ; // cerr<<"Skipping!"<<endl;
+                // else cerr<<"Skipping!"<<endl;
         }
         return true;
 }
index 4b1260873cb4583f2d2393decc19bbada94f1de8..9fdfbe35b2140c22ef6c3c5d298cbdd15fc77327 100644 (file)
@@ -36,11 +36,11 @@ public:
     {}
   
     
-  const char operator[](unsigned int offset) const
+  char operator[](unsigned int offset) const
   {
     if(offset < d_length)
       return d_ptr[offset];
-    else throw runtime_error("out of bounds: "+boost::lexical_cast<string>(offset)+" >= " + boost::lexical_cast<string>(d_length));
+    throw runtime_error("out of bounds: "+boost::lexical_cast<string>(offset)+" >= " + boost::lexical_cast<string>(d_length));
   }
 private:  
   const char* d_ptr;
index e5d3de55c8d517aadbddb40d2858ef18c8a4ac81..55b8fd8138dd5e3bae75de8ec72763e2d199a54e 100644 (file)
@@ -139,8 +139,7 @@ void fillOutRRSIG(DNSSECPrivateKey& dpk, const std::string& signQName, RRSIGReco
       rrc.d_signature=iter->second;
       return;
     }
-    else
-      ; // cerr<<"Miss!"<<endl;
+    // else cerr<<"Miss!"<<endl;  
   }
   
   rrc.d_signature = rc->sign(msg);
index 7c308e47a380dfed0a5f2f93f2d37c7f95dcc400..25718dfe632e4b3a848d14a87ecde655605a0869 100644 (file)
@@ -1,6 +1,6 @@
 /*
     PowerDNS Versatile Database Driven Nameserver
-    Copyright (C) 2002 - 2010 PowerDNS.COM BV
+    Copyright (C) 2002 - 2014 PowerDNS.COM BV
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2 as 
 #include <boost/scoped_array.hpp>
 #include <boost/algorithm/string.hpp>
 
-string dns0x20(const std::string& in)
-{
-  string ret(in);
-  string::size_type len=ret.size();
-  for(string::size_type pos = 0 ; pos < len; ++pos) {
-    if(isalpha(in[pos]) && dns_random(2))
-      ret[pos]^=0x20;
-  }
-  //  cerr<<"'"<<in<<"' -> '"<<ret<<"'\n";
-  return ret;
-}
-
 //! returns -2 for OS limits error, -1 for permanent error that has to do with remote **transport**, 0 for timeout, 1 for success
 /** lwr is only filled out in case 1 was returned, and even when returning 1 for 'success', lwr might contain DNS errors
     Never throws! 
index 48c76c497d97733f6f1c991c26da757875565622..46b31796f76ec47b7449f7e3b11ad655e7331178 100644 (file)
@@ -330,8 +330,8 @@ vector<DNSResourceRecord> ChunkedSigningPipe::getChunk(bool final)
   d_chunks.pop_front();
   if(d_chunks.empty())
     d_chunks.push_back(vector<DNSResourceRecord>());
-  if(d_final && front.empty())
-    ; // cerr<<"getChunk returning empty in final"<<endl;
+/*  if(d_final && front.empty())
+      cerr<<"getChunk returning empty in final"<<endl; */
   return front;
 }
 
index 1b94a83d88dac6135f1b06c6251c23eec3f23eb9..e5c39ead7f6bfe81b8eaa218791363463169f26a 100644 (file)
@@ -278,6 +278,8 @@ int SyncRes::asyncresolveWrapper(const ComboAddress& ip, const string& domain, i
      If '4', send bare queries
   */
 
+  return asyncresolve(ip, domain, type, doTCP, sendRDQuery, true, now, res);
+
   if(s_noEDNS) {
     g_stats.noEdnsOutQueries++;
     return asyncresolve(ip, domain, type, doTCP, sendRDQuery, 0, now, res);