BIND 10 trac1084, updated. 4191945aad5aaf0873b15727716d0a988b1c978d [trac1084] Reorder statements in MemoryZone::add
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jun 30 12:38:42 UTC 2011
The branch, trac1084 has been updated
via 4191945aad5aaf0873b15727716d0a988b1c978d (commit)
from ae4e7f10136bd182db6d4801ace410e72574abf2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4191945aad5aaf0873b15727716d0a988b1c978d
Author: Stephen Morris <stephen at isc.org>
Date: Thu Jun 30 13:37:19 2011 +0100
[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.)
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory_datasrc.cc | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc
index 3c57d1b..b8019a2 100644
--- a/src/lib/datasrc/memory_datasrc.cc
+++ b/src/lib/datasrc/memory_datasrc.cc
@@ -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.
More information about the bind10-changes
mailing list