From: Ruben d'Arco Date: Mon, 22 Jul 2013 17:33:47 +0000 (+0200) Subject: changedRecords is now a uint and with a normal name again. X-Git-Tag: rec-3.6.0-rc1~545^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F922%2Fhead;p=thirdparty%2Fpdns.git changedRecords is now a uint and with a normal name again. --- diff --git a/pdns/packethandler.hh b/pdns/packethandler.hh index 80c3c94432..558975e7c8 100644 --- a/pdns/packethandler.hh +++ b/pdns/packethandler.hh @@ -87,7 +87,7 @@ private: void emitNSEC3(const NSEC3PARAMRecordContent &ns3rc, const SOAData& sd, const std::string& unhashed, const std::string& begin, const std::string& end, const std::string& toNSEC3, DNSPacket *r, int mode); int processUpdate(DNSPacket *p); int forwardPacket(const string &msgPrefix, DNSPacket *p, DomainInfo *di); - uint16_t performUpdate(const string &msgPrefix, const DNSRecord *rr, DomainInfo *di, bool isPresigned, bool* narrow, bool* haveNSEC3, NSEC3PARAMRecordContent *ns3pr, bool *updatedSerial); + uint performUpdate(const string &msgPrefix, const DNSRecord *rr, DomainInfo *di, bool isPresigned, bool* narrow, bool* haveNSEC3, NSEC3PARAMRecordContent *ns3pr, bool *updatedSerial); int checkUpdatePrescan(const DNSRecord *rr); int checkUpdatePrerequisites(const DNSRecord *rr, DomainInfo *di); void increaseSerial(const string &msgPrefix, const DomainInfo *di, bool haveNSEC3, bool narrow, const NSEC3PARAMRecordContent *ns3pr); diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index b80215f271..6bf5c73252 100644 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -86,7 +86,7 @@ int PacketHandler::checkUpdatePrescan(const DNSRecord *rr) { // Implements section 3.4.2 of RFC2136 -uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *rr, DomainInfo *di, bool isPresigned, bool* narrow, bool* haveNSEC3, NSEC3PARAMRecordContent *ns3pr, bool *updatedSerial) { +uint PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *rr, DomainInfo *di, bool isPresigned, bool* narrow, bool* haveNSEC3, NSEC3PARAMRecordContent *ns3pr, bool *updatedSerial) { string rrLabel = stripDot(rr->d_label); rrLabel = toLower(rrLabel); @@ -108,7 +108,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * } - uint16_t changedRecords = 0; + uint changedRecords = 0; DNSResourceRecord rec; vector rrset, recordsToDelete; set delnonterm, insnonterm; // used to (at the end) fix ENT records. @@ -828,7 +828,7 @@ int PacketHandler::processUpdate(DNSPacket *p) { // 3.4 - Prescan & Add/Update/Delete records - is all done within a try block. try { - uint16_t changedRecs = 0; + uint changedRecords = 0; // 3.4.1 - Prescan section for(MOADNSParser::answers_t::const_iterator i=mdp.d_answers.begin(); i != mdp.d_answers.end(); ++i) { const DNSRecord *rr = &i->first; @@ -858,7 +858,7 @@ int PacketHandler::processUpdate(DNSPacket *p) { if (rr->d_class == QClass::NONE && rr->d_type == QType::NS && stripDot(rr->d_label) == di.zone) nsRRtoDelete.push_back(rr); else - changedRecs += performUpdate(msgPrefix, rr, &di, isPresigned, &narrow, &haveNSEC3, &ns3pr, &updatedSerial); + changedRecords += performUpdate(msgPrefix, rr, &di, isPresigned, &narrow, &haveNSEC3, &ns3pr, &updatedSerial); } } if (nsRRtoDelete.size()) { @@ -872,32 +872,32 @@ int PacketHandler::processUpdate(DNSPacket *p) { for (vector::iterator inZone=nsRRInZone.begin(); inZone != nsRRInZone.end(); inZone++) { for (vector::iterator rr=nsRRtoDelete.begin(); rr != nsRRtoDelete.end(); rr++) { if (inZone->getZoneRepresentation() == (*rr)->d_content->getZoneRepresentation()) - changedRecs += performUpdate(msgPrefix, *rr, &di, isPresigned, &narrow, &haveNSEC3, &ns3pr, &updatedSerial); + changedRecords += performUpdate(msgPrefix, *rr, &di, isPresigned, &narrow, &haveNSEC3, &ns3pr, &updatedSerial); } } } } // Section 3.6 - Update the SOA serial - outside of performUpdate because we do a SOA update for the complete update message - if (changedRecs > 0 && !updatedSerial) { + if (changedRecords > 0 && !updatedSerial) { increaseSerial(msgPrefix, &di, haveNSEC3, narrow, &ns3pr); - changedRecs++; + changedRecords++; } - if (changedRecs > 0) { + if (changedRecords > 0) { if (!di.backend->commitTransaction()) { L<