void Bind2Backend::setNotified(uint32_t id, uint32_t serial)
{
BB2DomainInfo bbd;
- safeGetBBDomainInfo(id, &bbd);
+ if (!safeGetBBDomainInfo(id, &bbd))
+ return;
bbd.d_lastnotified = serial;
safePutBBDomainInfo(bbd);
}
bool Bind2Backend::feedRecord(const DNSResourceRecord &rr, const DNSName &ordername)
{
BB2DomainInfo bbd;
- safeGetBBDomainInfo(d_transaction_id, &bbd);
+ if (!safeGetBBDomainInfo(d_transaction_id, &bbd))
+ return false;
string qname;
string name = bbd.d_name.toString();
if(safeGetBBDomainInfo(zone, &bbd)) {
Bind2Backend bb2;
bb2.queueReloadAndStore(bbd.d_id);
- safeGetBBDomainInfo(zone, &bbd); // Read the *new* domain status
- ret<< *i << ": "<< (bbd.d_wasRejectedLastReload ? "[rejected]": "") <<"\t"<<bbd.d_status<<"\n";
+ if (!safeGetBBDomainInfo(zone, &bbd)) // Read the *new* domain status
+ ret << *i << ": [missing]\n";
+ else
+ ret<< *i << ": "<< (bbd.d_wasRejectedLastReload ? "[rejected]": "") <<"\t"<<bbd.d_status<<"\n";
}
else
ret<< *i << " no such domain\n";
bool Bind2Backend::getBeforeAndAfterNamesAbsolute(uint32_t id, const DNSName& qname, DNSName& unhashed, DNSName& before, DNSName& after)
{
BB2DomainInfo bbd;
- safeGetBBDomainInfo(id, &bbd);
+ if (!safeGetBBDomainInfo(id, &bbd))
+ return false;
NSEC3PARAMRecordContent ns3pr;