summaryrefslogtreecommitdiffhomepage
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 42d3176..a67a8c9 100644
--- a/utils.c
+++ b/utils.c
@@ -37,11 +37,16 @@ vlist_add(struct vlist_tree *tree, struct vlist_node *node)
anode = avl_find(&tree->avl, key);
if (anode) {
+ if (tree->keep_old)
+ goto update_only;
+
old_node = container_of(anode, struct vlist_node, avl);
avl_delete(&tree->avl, anode);
}
avl_insert(&tree->avl, &node->avl);
+
+update_only:
tree->update(tree, node, old_node);
}