d_negcached=0;
d_ancount=0;
- domain_id=-1;
+ d_domain_id=-1;
d_cached=0;
d_cache_ttl = ::arg().asNum("query-cache-ttl");
d_negcache_ttl = ::arg().asNum("negquery-cache-ttl");
- tid=pthread_self();
- stale=false;
+ d_tid=pthread_self();
+ d_stale=false;
backends=BackendMakers().all(pname=="key-only");
}
// this handle is more magic than most
void UeberBackend::lookup(const QType &qtype,const DNSName &qname, DNSPacket *pkt_p, int zoneId)
{
- if(stale) {
+ if(d_stale) {
L<<Logger::Error<<"Stale ueberbackend received question, signalling that we want to be recycled"<<endl;
throw PDNSException("We are stale, please recycle");
}
pthread_mutex_unlock(&d_mut);
}
- domain_id=zoneId;
+ d_domain_id=zoneId;
d_handle.i=0;
d_handle.qtype=qtype;
if(!backends.size()) {
L<<Logger::Error<<"No database backends available - unable to answer questions."<<endl;
- stale=true; // please recycle us!
+ d_stale=true; // please recycle us!
throw PDNSException("We are stale, please recycle");
}
else {
<<" out of answers, taking next"<<endl);
d_hinterBackend=parent->backends[i++];
- d_hinterBackend->lookup(qtype,qname,pkt_p,parent->domain_id);
+ d_hinterBackend->lookup(qtype,qname,pkt_p,parent->d_domain_id);
}
else
break;
bool searchRecords(const string &pattern, int maxResults, vector<DNSResourceRecord>& result);
bool searchComments(const string &pattern, int maxResults, vector<Comment>& result);
private:
- pthread_t tid;
+ pthread_t d_tid;
handle d_handle;
vector<DNSZoneRecord> d_answers;
vector<DNSZoneRecord>::const_iterator d_cachehandleiter;
}d_question;
unsigned int d_cache_ttl, d_negcache_ttl;
- int domain_id;
+ int d_domain_id;
int d_ancount;
bool d_negcached;
bool d_cached;
static bool d_go;
- bool stale;
+ bool d_stale;
int cacheHas(const Question &q, vector<DNSZoneRecord> &rrs);
void addNegCache(const Question &q);