From: Mukund Sivaraman Date: Fri, 20 Jul 2012 05:34:17 +0000 (+0530) Subject: [2092] Restore subtree root flag after node fission X-Git-Tag: trac2351_base~158^2^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3bdd3af49ba988672eb7b3db05e501d2fd94bbaf;p=thirdparty%2Fkea.git [2092] Restore subtree root flag after node fission --- diff --git a/src/lib/datasrc/rbtree.h b/src/lib/datasrc/rbtree.h index 403edd0956..2ea63442f2 100644 --- a/src/lib/datasrc/rbtree.h +++ b/src/lib/datasrc/rbtree.h @@ -1509,8 +1509,10 @@ RBTree::nodeFission(RBNode& 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();