From: Felix Fietkau Date: Thu, 2 Feb 2012 23:14:50 +0000 (+0100) Subject: vlist: fix node version update for tree->keep_old/no_delete X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e270a58cef32d7b48edd6661e339ca855d177fe2;p=oweals%2Fnetifd.git vlist: fix node version update for tree->keep_old/no_delete --- 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); }