Commit 4191945a authored by Stephen Morris's avatar Stephen Morris
Browse files

[trac1084] Reorder statements in MemoryZone::add

Only log details of the zone being added after input validation,
when it is known the the zone pointer is non-null.  (Validation
detects null pointers and throws an exception.)
parent ae4e7f10
......@@ -225,10 +225,13 @@ struct MemoryZone::MemoryZoneImpl {
*/
// Implementation of MemoryZone::add
result::Result add(const ConstRRsetPtr& rrset, DomainTree* domains) {
// Sanitize input. This will cause an exception to be thrown
// if the input RRset is empty.
addValidation(rrset);
// OK, can add the RRset.
LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_ADD_RRSET).
arg(rrset->getName()).arg(rrset->getType()).arg(origin_);
// Sanitize input
addValidation(rrset);
// Add wildcards possibly contained in the owner name to the domain
// tree.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment