Parcourir la source

[2092] Restore subtree root flag after node fission

Mukund Sivaraman il y a 12 ans
Parent
commit
3bdd3af49b
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      src/lib/datasrc/rbtree.h

+ 2 - 0
src/lib/datasrc/rbtree.h

@@ -1509,8 +1509,10 @@ RBTree<T>::nodeFission(RBNode<T>& node, const isc::dns::Name& base_name) {
     // the rest of this function should be exception free so that it keeps
     // consistent behavior (i.e., a weak form of strong exception guarantee)
     // even if code after the call to this function throws an exception.
+    bool is_root = node.isSubTreeRoot();
     std::swap(node.data_, down_node->data_);
     std::swap(node.flags_, down_node->flags_);
+    node.setSubTreeRoot(is_root);
 
     down_node->down_ = node.getDown();