std::string DNSCryptoKeyEngine::convertToISC() const
{
- typedef map<string, string> stormap_t;
storvector_t stormap = this->convertToISCVector();
ostringstream ret;
ret<<"Private-key-format: v1.2\n";
d_lw->registerFunction<boost::optional<ComboAddress>(DNSRecord::*)()>("getCA", [](const DNSRecord& dr) {
boost::optional<ComboAddress> ret;
- if(auto rec = std::dynamic_pointer_cast<ARecordContent>(dr.d_content))
- ret=rec->getCA(53);
- else if(auto rec = std::dynamic_pointer_cast<AAAARecordContent>(dr.d_content))
- ret=rec->getCA(53);
+ if(auto arec = std::dynamic_pointer_cast<ARecordContent>(dr.d_content))
+ ret=arec->getCA(53);
+ else if(auto aaaarec = std::dynamic_pointer_cast<AAAARecordContent>(dr.d_content))
+ ret=aaaarec->getCA(53);
return ret;
});
d_lw->registerFunction<void(DNSRecord::*)(const std::string&)>("changeContent", [](DNSRecord& dr, const std::string& newContent) { dr.d_content = shared_ptr<DNSRecordContent>(DNSRecordContent::mastermake(dr.d_type, 1, newContent)); });
}
// returns -1 in case of error, 0 if no data is available, 1 if there is. In the first two cases, errno is set
-int waitForMultiData(const set<int>& fds, const int seconds, const int useconds, int* fd) {
+int waitForMultiData(const set<int>& fds, const int seconds, const int useconds, int* fdOut) {
set<int> realFDs;
for (const auto& fd : fds) {
if (fd >= 0 && realFDs.count(fd) == 0) {
}
set<int>::const_iterator it(pollinFDs.begin());
advance(it, random() % pollinFDs.size());
- *fd = *it;
+ *fdOut = *it;
return 1;
}
fromaddr.sin6.sin6_family=AF_INET6; // this makes sure fromaddr is big enough
fillMSGHdr(&msgh, &iov, cbuf, sizeof(cbuf), &data[0], data.size(), &fromaddr);
- for(size_t counter = 0; counter < s_maxUDPQueriesPerRound; counter++)
+ for(size_t queriesCounter = 0; queriesCounter < s_maxUDPQueriesPerRound; queriesCounter++)
if((len=recvmsg(fd, &msgh, 0)) >= 0) {
firstQuery = false;
{
int count=0;
d_cachecachevalid=false;
- pair<cache_t::iterator, cache_t::iterator> range;
if(!sub) {
- pair<ecsIndex_t::iterator, ecsIndex_t::iterator> ecsIndexRange;
auto& idx = d_cache.get<NameOnlyHashedTag>();
auto range = idx.equal_range(name);
for(auto& i=range.first; i != range.second; ) {