BIND 10 trac503, updated. c8e84e56caeb809f91c7823ae1c4e9aa30e49c57 [trac503] Avoid creating unnecessary RRsetList
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jan 26 09:40:48 UTC 2011
The branch, trac503 has been updated
via c8e84e56caeb809f91c7823ae1c4e9aa30e49c57 (commit)
from 239c9694953dcd1dc1ffdd60b7205fca5fdd651c (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 c8e84e56caeb809f91c7823ae1c4e9aa30e49c57
Author: chenzhengzhang <jerry.zzpku at gmail.com>
Date: Wed Jan 26 17:36:02 2011 +0800
[trac503] Avoid creating unnecessary RRsetList
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/query.cc | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/query.cc b/src/bin/auth/query.cc
index 3f7cd8a..e270500 100644
--- a/src/bin/auth/query.cc
+++ b/src/bin/auth/query.cc
@@ -123,8 +123,6 @@ void
Query::process() const {
bool keep_doing = true;
const bool qtype_is_any = (qtype_ == RRType::ANY());
- RRsetList result_rrsets;
- RRsetList* target = NULL;
response_.setHeaderFlag(Message::HEADERFLAG_AA, false);
const MemoryDataSrc::FindResult result =
@@ -145,11 +143,9 @@ Query::process() const {
response_.setHeaderFlag(Message::HEADERFLAG_AA);
while (keep_doing) {
keep_doing = false;
- if (qtype_is_any) {
- target = &result_rrsets;
- }
-
- Zone::FindResult db_result = result.zone->find(qname_, qtype_, target);
+ std::auto_ptr<RRsetList> target(qtype_is_any ? new RRsetList : NULL);
+ Zone::FindResult db_result =
+ result.zone->find(qname_, qtype_, target.get());
switch (db_result.code) {
case Zone::SUCCESS:
More information about the bind10-changes
mailing list