summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-02-03 00:14:50 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-02-03 00:14:50 +0100
commite270a58cef32d7b48edd6661e339ca855d177fe2 (patch)
tree04bba15ff1db56113def2ed83378cd9d51c7d8a1
parent70d48250e7d25e7df13032eb69e30f0022e4e556 (diff)
vlist: fix node version update for tree->keep_old/no_delete
-rw-r--r--utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index 0b80064..0b13f86 100644
--- a/utils.c
+++ b/utils.c
@@ -40,8 +40,10 @@ vlist_add(struct vlist_tree *tree, struct vlist_node *node)
anode = avl_find(&tree->avl, key);
if (anode) {
old_node = container_of(anode, struct vlist_node, avl);
- if (tree->keep_old || tree->no_delete)
+ if (tree->keep_old || tree->no_delete) {
+ old_node->version = tree->version;
goto update_only;
+ }
avl_delete(&tree->avl, anode);
}