Commit dcfa4914 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[trac550] mark wildcarding node

parent 389cf02a
...@@ -61,6 +61,7 @@ struct MemoryZone::MemoryZoneImpl { ...@@ -61,6 +61,7 @@ struct MemoryZone::MemoryZoneImpl {
// The tree stores domains // The tree stores domains
typedef RBTree<Domain, true> DomainTree; typedef RBTree<Domain, true> DomainTree;
typedef RBNode<Domain> DomainNode; typedef RBNode<Domain> DomainNode;
static const DomainNode::Flags DOMAINFLAG_WILD = DomainNode::FLAG_USER1;
// Information about the zone // Information about the zone
RRClass zone_class_; RRClass zone_class_;
...@@ -103,10 +104,12 @@ struct MemoryZone::MemoryZoneImpl { ...@@ -103,10 +104,12 @@ struct MemoryZone::MemoryZoneImpl {
assert(result == DomainTree::SUCCESS || assert(result == DomainTree::SUCCESS ||
result == DomainTree::ALREADYEXISTS); result == DomainTree::ALREADYEXISTS);
// Ensure a separate level exists for the "wildcarding" name // Ensure a separate level exists for the "wildcarding" name,
// and mark the node as "wild".
result = domains.insert(wname, &node); result = domains.insert(wname, &node);
assert(result == DomainTree::SUCCESS || assert(result == DomainTree::SUCCESS ||
result == DomainTree::ALREADYEXISTS); result == DomainTree::ALREADYEXISTS);
node->setFlag(DOMAINFLAG_WILD);
} }
} }
} }
......
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