BIND 10 #200: use new Name::split() in data source
BIND 10 Development
do-not-reply at isc.org
Thu Jun 17 23:46:00 UTC 2010
#200: use new Name::split() in data source
-------------------------+--------------------------------------------------
Reporter: jinmei | Owner: jinmei
Type: enhancement | Status: reviewing
Priority: minor | Milestone: 05. 3rd Incremental Release: Serious Secondary
Component: data source | Resolution:
Keywords: | Sensitive: 0
-------------------------+--------------------------------------------------
Comment(by jinmei):
Replying to [comment:5 each]:
{{{
for (int i = diff - 1; i >= 0; --i) {
const Name sub(task->qname.split(i));
}}}
> I'm not sure, but I think maybe the ">= 0" should be "> 0". As written,
I think this would cause it to match down all the way to the qname itself,
whereas we actually want it to stop matching at the parent.
You're right, good catch.
I've added a unit test case to catch the bug, and left a note as a comment
that we exclude the apex and the qname. (frankly, I think the matching
rule here is quite tricky and error prone, and I hope we can eventually
refactor the logic. but that's certainly another topic).
> Also, I think you can eliminate the "nlen" variable now.
Good suggestion, applied.
> Otherwise the patch looks fine.
I've now created a shortlived branch (branches/trac200) including
everything and committed the changes there. It's single svn changeset,
r2157. Could you confirm that?
Oh, and I've realized I didn't include expected changelog entry. Here it
is:
{{{
57.? [func] jinmei
lib/datasrc: used a simpler version of Name::split (change 31) for
better readability. No behavior change. (Trac #200, svn TODO)
}}}
Thanks,
--
Ticket URL: <https://bind10.isc.org/ticket/200#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list