]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- fast-reload, in hints_swap_tree also swap the node count of the trees.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 9 Jan 2024 11:12:14 +0000 (12:12 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 9 Jan 2024 11:12:14 +0000 (12:12 +0100)
iterator/iter_hints.c

index ce2741eaf9676705572ec535873d6317ed60f60c..5a95b78cd11d63f3b7829b21c920154e140c0d69 100644 (file)
@@ -580,6 +580,9 @@ void
 hints_swap_tree(struct iter_hints* hints, struct iter_hints* data)
 {
        rbnode_type* oldroot = hints->tree.root;
+       size_t oldcount = hints->tree.count;
        hints->tree.root = data->tree.root;
+       hints->tree.count = data->tree.count;
        data->tree.root = oldroot;
+       data->tree.count = oldcount;
 }