From: Pieter Lexis Date: Tue, 22 Dec 2015 15:41:32 +0000 (+0100) Subject: Fix logic error in zone2sql X-Git-Tag: dnsdist-1.0.0-alpha1~28^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3084%2Fhead;p=thirdparty%2Fpdns.git Fix logic error in zone2sql Introduced in #3019. Closes #3067 --- diff --git a/pdns/zone2sql.cc b/pdns/zone2sql.cc index cc4ca92dbe..d95c5f2afc 100644 --- a/pdns/zone2sql.cc +++ b/pdns/zone2sql.cc @@ -421,12 +421,14 @@ try continue; if(rr.qtype.getCode() == QType::SOA) seenSOA=true; - if(!haveEmittedZone && !zpt.getZoneName().empty()){ - emitDomain(zpt.getZoneName().toStringNoDot()); - haveEmittedZone = true; - } else { - // We have no zonename yet, don't emit - continue; + if(!haveEmittedZone) { + if(!zpt.getZoneName().empty()){ + emitDomain(zpt.getZoneName().toStringNoDot()); + haveEmittedZone = true; + } else { + // We have no zonename yet, don't emit + continue; + } } emitRecord(zpt.getZoneName().toStringNoDot(), rr.qname, rr.qtype.getName(), rr.content, rr.ttl, comment);