di.backend->lookup(QType(QType::ANY), rr->d_name);
while (di.backend->get(rec)) {
if (rec.qtype != QType::CNAME && rec.qtype != QType::RRSIG) {
+ // leave database handle in a consistent state
+ while (di.backend->get(rec))
+ ;
g_log<<Logger::Warning<<msgPrefix<<"Refusing update for " << rr->d_name << "/" << QType(rr->d_type).getName() << ": Data other than CNAME exists for the same name"<<endl;
di.backend->abortTransaction();
return RCode::Refused;
di.backend->lookup(QType(QType::CNAME), rr->d_name);
while (di.backend->get(rec)) {
if (rec.qtype == QType::CNAME && rr->d_type != QType::RRSIG) {
+ // leave database handle in a consistent state
+ while (di.backend->get(rec))
+ ;
g_log<<Logger::Warning<<msgPrefix<<"Refusing update for " << rr->d_name << "/" << QType(rr->d_type).getName() << ": CNAME exists for the same name"<<endl;
di.backend->abortTransaction();
return RCode::Refused;