diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-07-16 10:53:18 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-07-16 10:53:18 -0700 |
commit | a9388a69d870158e99807093a992cc1fe09c4892 (patch) | |
tree | 6227fe6872eba7c959cea6fcbacf05bd302bc2c6 /src/commit2.c | |
parent | 7f56f0414c09c43be4c5953983296c54ae1f8233 (diff) | |
download | vyatta-cfg-a9388a69d870158e99807093a992cc1fe09c4892.tar.gz vyatta-cfg-a9388a69d870158e99807093a992cc1fe09c4892.zip |
fix for bug 5789 and bug 5860
Diffstat (limited to 'src/commit2.c')
-rw-r--r-- | src/commit2.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/commit2.c b/src/commit2.c index a87010c..56e4290 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -1265,10 +1265,15 @@ validate_func(GNode *node, gpointer data) result->_data = (void*)coll; } } + + //don't run syntax check on this node if it is unchanged. + if (IS_NOOP(d->_operation) && (c->_def.actions[syntax_act].vtw_list_head != NULL && c->_def.actions[syntax_act].vtw_list_head->vtw_node_aux == 0)) { + return FALSE; + } //don't perform validation checks on disabled nodes if ((d->_disable_op == K_LOCAL_DISABLE_OP) || (d->_disable_op == (K_LOCAL_DISABLE_OP | K_ACTIVE_DISABLE_OP))) { - return FALSE; //SHOULD only hit the case where the node is locally disabled or globally disabled and not in a transition to active state + return FALSE; //SHOULD only hit the case where the node is locally disabled or globally disabled and not in a transition to active state } if (IS_DELETE(d->_operation) && !IS_ACTIVE(d->_operation)) { @@ -1332,7 +1337,14 @@ validate_func(GNode *node, gpointer data) } else { char buf[MAX_LENGTH_DIR_PATH*sizeof(char)]; - sprintf(buf,"%s\t:\t%s",ActionNames[result->_action],d->_path); + if (c->_def.actions[syntax_act].vtw_list_head) { + if (c->_def.actions[syntax_act].vtw_list_head->vtw_node_aux == 0) { + sprintf(buf,"syntax\t:\t%s",d->_path); + } + else { + sprintf(buf,"commit\t:\t%s",d->_path); + } + } if (c->_def.multi) { //need to handle the embedded multinode as a special case--should be fixed! char *val = (char*)clind_unescape(d->_name); strcat(buf,val); |