summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-06-30 19:35:16 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-06-30 19:35:16 -0500
commit3f9c2979ce886c6d23578eed4776b7d73fb1b10a (patch)
tree054edd373935ce28527dfa693ec1a92fe056555a /src
parentd805f29c41ed9a705afb1b227caf0a95040a178c (diff)
downloadvyatta-cfg-3f9c2979ce886c6d23578eed4776b7d73fb1b10a.tar.gz
vyatta-cfg-3f9c2979ce886c6d23578eed4776b7d73fb1b10a.zip
Bugfix 7224: check nodes immediate children for changes when the node its self is unchanged. If a child has changed run the commit check for the node
Diffstat (limited to 'src')
-rw-r--r--src/commit/commit-algorithm.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp
index 5f77dfb..687e2df 100644
--- a/src/commit/commit-algorithm.cpp
+++ b/src/commit/commit-algorithm.cpp
@@ -509,8 +509,20 @@ _commit_check_cfg_node(Cstore& cs, CfgNode *node, CommittedPathListT& clist)
for (size_t i = 0; i < nodelist.size(); i++) {
CommitState s = nodelist[i]->getCommitState();
if (s == COMMIT_STATE_UNCHANGED) {
- // nop
- continue;
+ // check if an immediate child node has changed.
+ // if so do the syntax act here
+ // This puts back the pre-larkspur behavior that features expect to happen.
+ vector <CfgNode *> childNodes;
+ childNodes = nodelist[i]->getChildNodes();
+ for (size_t j = 0; j < childNodes.size(); j++){
+ if (childNodes[j]->getCommitState() != COMMIT_STATE_UNCHANGED) {
+ if (!_exec_node_actions(cs, *(nodelist[i]), syntax_act)) {
+ return false;
+ }
+ break; // break out of the inner for loop
+ }
+ }
+ continue; //continue the outer for loop
}
_set_commit_subtree_changed(*(nodelist[i]));