// 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 );
}
else
return true;
}
- else
- ;
}
keyset_t keys = getKeys(zone, true); // does the cache
rr.ttl = signTTL;
rrsigs.push_back(rr);
}
- else ; // cerr<<"Skipping!"<<endl;
+ // else cerr<<"Skipping!"<<endl;
}
return true;
}
{}
- 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;
rrc.d_signature=iter->second;
return;
}
- else
- ; // cerr<<"Miss!"<<endl;
+ // else cerr<<"Miss!"<<endl;
}
rrc.d_signature = rc->sign(msg);
/*
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!
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;
}
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);