diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2009-11-03 11:22:02 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2009-11-03 11:22:02 -0800 |
commit | caedbce5eccac79a5a2b3eded8dcb8838d2a51bf (patch) | |
tree | 4a93d9b240000ca4432df34e500046b36e58c7f3 | |
parent | 70ba0c76a9c7c7699e1b2f612277d56d99828a49 (diff) | |
parent | a889b4efa38f86c2704595ad6c4e6f665bd2ce91 (diff) | |
download | vyatta-cfg-caedbce5eccac79a5a2b3eded8dcb8838d2a51bf.tar.gz vyatta-cfg-caedbce5eccac79a5a2b3eded8dcb8838d2a51bf.zip |
Merge branch 'kenwood' of http://git.vyatta.com/vyatta-cfg into kenwood
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | src/common/unionfs.c | 32 |
2 files changed, 27 insertions, 13 deletions
diff --git a/debian/changelog b/debian/changelog index dc212c3..9febd26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +vyatta-cfg (0.15.37) unstable; urgency=low + + [ slioch ] + * fix for missing priority value on embedded multinode. bug behavior + was more limited than this--at least tag node.def and multiple + + -- root <root@eng-140.vyatta.com> Mon, 02 Nov 2009 17:26:42 -0800 + vyatta-cfg (0.15.36) unstable; urgency=low [ David S. Madole ] diff --git a/src/common/unionfs.c b/src/common/unionfs.c index 45127e8..452c774 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -225,13 +225,6 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) } //either multi or tag--shouldn't have made a difference, but arkady was confused. vn->_config._multi = (def.tag | def.multi); - if (def.def_priority == 0) { - vn->_config._priority = LOWEST_PRIORITY; - } - else { - vn->_config._priority = def.def_priority; - } - } } @@ -252,12 +245,6 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) //Need to do two things: // 1. Come to agreement on where the behavior splits on priority multinodes // 2. Not check for tag node in the def datastructure but use the new datastructure as at some point tag and multi will be the same - if (vn_parent->_config._def.tag == TRUE) { //only for embedded multinodes - vn->_config._priority = vn_parent->_config._priority; - vn_parent->_config._priority = LOWEST_PRIORITY; - } - - //now let's patch up the def multi-nodes //move the def for the multinode from the parent to the value node struct VyattaNode* vn2 = (struct VyattaNode*)node->data; @@ -282,6 +269,25 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) } } + + if (G_NODE_IS_ROOT(node) == FALSE) { + struct VyattaNode* vn_parent = (struct VyattaNode*)node->parent->data; + struct VyattaNode* vn = (struct VyattaNode*)node->data; + // vn->_config._priority = vn_parent->_config._def.def_priority; + if (vn->_config._def.tag && vn->_config._multi) { + vn->_config._priority = LOWEST_PRIORITY; + } + else if (vn->_config._def.def_priority == 0) { + vn->_config._priority = LOWEST_PRIORITY; + } + else { + vn->_config._priority = vn->_config._def.def_priority; + } + } + + + + if (final_node == TRUE) { //move defs to child... get_term_data_values(node); |