summaryrefslogtreecommitdiff
path: root/src/cstore/cstore-c.cpp
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-08-20 13:29:49 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-08-20 13:29:49 -0700
commitcbd1770462b2325372f90ef9200110dc66245377 (patch)
tree0bc0e2e3cb08576d20acc727d9a4e4521ea01428 /src/cstore/cstore-c.cpp
parent6c98b67a95f4bc35a801720dcca8460a75dcaed7 (diff)
downloadvyatta-cfg-cbd1770462b2325372f90ef9200110dc66245377.tar.gz
vyatta-cfg-cbd1770462b2325372f90ef9200110dc66245377.zip
handle "changed" status properly
* original backend implementation uses unionfs-specific "changes only" dir to determine "changed" status. this breaks when it involves deactivated nodes. * new library design uses explicit per-node "changed" marker. however, since previously "commit" only handles a root "changed" marker, the new library could not implement this scheme and used a workaround instead. * now add API functions for "commit" to properly clean up "changed" markers. * modify "commit" to use these API functions and remove the workaround from the new library.
Diffstat (limited to 'src/cstore/cstore-c.cpp')
-rw-r--r--src/cstore/cstore-c.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cstore/cstore-c.cpp b/src/cstore/cstore-c.cpp
index fd818a5..c835efe 100644
--- a/src/cstore/cstore-c.cpp
+++ b/src/cstore/cstore-c.cpp
@@ -143,6 +143,19 @@ cstore_cfg_path_get_effective_value(void *handle, const char *path_comps[],
return NULL;
}
+int
+cstore_unmark_cfg_path_changed(void *handle, const char *path_comps[],
+ int num_comps)
+{
+ if (handle) {
+ vector<string> vs;
+ _get_str_vec(vs, path_comps, num_comps);
+ Cstore *cs = (Cstore *) handle;
+ return (cs->unmarkCfgPathChanged(vs) ? 1 : 0);
+ }
+ return 0;
+}
+
char **
cstore_path_string_to_path_comps(const char *path_str, int *num_comps)
{