summaryrefslogtreecommitdiff
path: root/src/cstore
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-08-19 18:56:21 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-08-19 18:56:21 -0700
commit3c6f899045ebc92ae24513b986363afe23be146a (patch)
treeba10482ee2552d6d5c57402dde00451639dccfca /src/cstore
parent29273c0ba8399d0b135384aec33d71fe28a93169 (diff)
downloadvyatta-cfg-3c6f899045ebc92ae24513b986363afe23be146a.tar.gz
vyatta-cfg-3c6f899045ebc92ae24513b986363afe23be146a.zip
adjust deactivate-aware logic
Diffstat (limited to 'src/cstore')
-rw-r--r--src/cstore/cstore.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp
index 33210dc..ebf9585 100644
--- a/src/cstore/cstore.cpp
+++ b/src/cstore/cstore.cpp
@@ -1198,16 +1198,24 @@ Cstore::cfgPathGetChildNodesStatusDA(const vector<string>& path_comps,
*
* for "added" state, can't use cfgPathAdded() since it's not DA.
*
+ * for "changed" state, can't use cfgPathChanged() since it's not DA.
+ *
* deleted ones already handled above.
*/
if (!cfg_path_exists(ppath, true, true)
&& cfg_path_exists(ppath, false, true)) {
cmap[work_nodes[i]] = C_NODE_STATUS_ADDED;
- } else if (cfgPathChanged(ppath)) {
- cmap[work_nodes[i]] = C_NODE_STATUS_CHANGED;
} else {
- cmap[work_nodes[i]] = C_NODE_STATUS_STATIC;
+ SAVE_PATHS;
+ append_cfg_path(ppath);
+ if (marked_changed()) {
+ cmap[work_nodes[i]] = C_NODE_STATUS_CHANGED;
+ } else {
+ cmap[work_nodes[i]] = C_NODE_STATUS_STATIC;
+ }
+ RESTORE_PATHS;
}
+
ppath.pop_back();
}
}