summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2009-11-05 16:40:23 -0800
committerBob Gilligan <gilligan@vyatta.com>2009-11-05 16:40:23 -0800
commite098fbffec2ed1efa9a248ae449b5cf67d0a2a36 (patch)
tree97d7263fb2b20c7a18a944d82f044ea2561db925 /src
parent5edd540c79f349cbe5f377f5b0e8ed16dcf7cf99 (diff)
parent700befa72bca86d054853820e8eaa8c34ddd1d4a (diff)
downloadvyatta-cfg-e098fbffec2ed1efa9a248ae449b5cf67d0a2a36.tar.gz
vyatta-cfg-e098fbffec2ed1efa9a248ae449b5cf67d0a2a36.zip
Merge branch 'kenwood' of http://git.vyatta.com/vyatta-cfg into kenwood
Diffstat (limited to 'src')
-rw-r--r--src/common/unionfs.c32
1 files changed, 19 insertions, 13 deletions
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);