diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-09 14:39:42 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-09 14:39:42 -0700 |
commit | 2bc58238bc4ee5136bf31719b7c7a2435c8012b0 (patch) | |
tree | a0f5514ac1fb99d7c1cd4a95a2075b3900b0933a /src/commit2.c | |
parent | 9e84035a42dcc335d9799256d7f465c3e3277500 (diff) | |
download | vyatta-cfg-2bc58238bc4ee5136bf31719b7c7a2435c8012b0.tar.gz vyatta-cfg-2bc58238bc4ee5136bf31719b7c7a2435c8012b0.zip |
cleanup and fix cases to handle activated deleted multinodes correctly. simplified deactivated nodes logic in commit.
Diffstat (limited to 'src/commit2.c')
-rw-r--r-- | src/commit2.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/commit2.c b/src/commit2.c index d5ed4d0..fabc7ae 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -752,7 +752,7 @@ sort_func(GNode *node, gpointer data, boolean priority_mode) } else if ((d->_disable_op & K_LOCAL_DISABLE_OP) && !(d->_disable_op & K_ACTIVE_DISABLE_OP)) { //node will be deactivated on commit - //LET'S SPOOF the operation... convert it to DELETE + //LET'S SPOOF the operation... convert it to DELETE op = K_DEL_OP; } } @@ -784,9 +784,10 @@ sort_func(GNode *node, gpointer data, boolean priority_mode) while (TRUE) { n = n->parent; vtw_def def = ((struct VyattaNode*)(n->data))->_config._def; - ((struct VyattaNode*)(n->data))->_data._operation = ((struct VyattaNode*)gp)->_data._operation; + // ((struct VyattaNode*)(n->data))->_data._operation = ((struct VyattaNode*)gp)->_data._operation; //DON'T set active when only in disable state... - if (((struct VyattaNode*)(n->data))->_data._disable_op == K_NO_DISABLE_OP) { + // if (((struct VyattaNode*)(n->data))->_data._disable_op == K_NO_DISABLE_OP) { + if (((struct VyattaNode*)(n->data))->_data._operation == K_NO_OP) { ((struct VyattaNode*)(n->data))->_data._operation |= K_ACTIVE_OP; } if (def.actions[end_act].vtw_list_head || def.actions[begin_act].vtw_list_head) { @@ -967,13 +968,13 @@ dump_func(GNode *node, gpointer data) char disable_op[2]; if (((struct VyattaNode*)gp)->_data._disable_op == (K_ACTIVE_DISABLE_OP | K_LOCAL_DISABLE_OP)) { - disable_op[0] = 'c'; + disable_op[0] = '!'; } else if (((struct VyattaNode*)gp)->_data._disable_op == K_ACTIVE_DISABLE_OP) { - disable_op[0] = 'u'; + disable_op[0] = 'A'; } else if (((struct VyattaNode*)gp)->_data._disable_op == K_LOCAL_DISABLE_OP) { - disable_op[0] = 's'; + disable_op[0] = 'D'; } else { disable_op[0] = ' '; |