]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2092] Restore subtree root flag after node fission
authorMukund Sivaraman <muks@isc.org>
Fri, 20 Jul 2012 05:34:17 +0000 (11:04 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 24 Jul 2012 05:54:47 +0000 (11:24 +0530)
src/lib/datasrc/rbtree.h

index 403edd09566902076999391cc81815e07551fa5c..2ea63442f29501f7652b722734ddf68ed58d0bb4 100644 (file)
@@ -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();