]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2811] Don't call rebalance for subtree roots
authorMukund Sivaraman <muks@isc.org>
Sat, 2 Mar 2013 14:28:14 +0000 (19:58 +0530)
committerMukund Sivaraman <muks@isc.org>
Fri, 2 Aug 2013 09:03:59 +0000 (14:33 +0530)
src/lib/datasrc/memory/domaintree.h

index a52651453e1d2cf0f6929081b9bab6428609b330..30391180b291c1b676807e2d972f6a2535c4da90 100644 (file)
@@ -1864,11 +1864,13 @@ DomainTree<T>::insert(util::MemorySegment& mem_sgmt,
     } else if (order < 0) {
         node->setSubTreeRoot(false);
         parent->left_ = node;
+        insertRebalance(current_root, node);
     } else {
         node->setSubTreeRoot(false);
         parent->right_ = node;
+        insertRebalance(current_root, node);
     }
-    insertRebalance(current_root, node);
+
     if (new_node != NULL) {
         *new_node = node;
     }