From 3c6f899045ebc92ae24513b986363afe23be146a Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 19 Aug 2010 18:56:21 -0700 Subject: adjust deactivate-aware logic --- src/cstore/cstore.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') 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& 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(); } } -- cgit v1.2.3