summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commit/commit-algorithm.cpp5
-rw-r--r--src/cstore/cstore-varref.cpp23
2 files changed, 18 insertions, 10 deletions
diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp
index 80567f0..a5d3415 100644
--- a/src/commit/commit-algorithm.cpp
+++ b/src/commit/commit-algorithm.cpp
@@ -1219,6 +1219,11 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2)
cst = ((s > 0) ? "PARTIAL" : "FAILURE");
}
+ if (s > 0) {
+ // notify other users in config mode
+ system("/opt/vyatta/sbin/vyatta-cfg-notify");
+ }
+
if (!cs.commitConfig(proot)) {
OUTPUT_USER("Failed to generate committed config\n");
ret = false;
diff --git a/src/cstore/cstore-varref.cpp b/src/cstore/cstore-varref.cpp
index 7549834..efe1b04 100644
--- a/src/cstore/cstore-varref.cpp
+++ b/src/cstore/cstore-varref.cpp
@@ -140,18 +140,21 @@ Cstore::VarRef::process_ref(const Cpath& ref_comps,
return;
}
pcomps.pop();
- def = _cstore->parseTmpl(pcomps, false);
- if (!def.get()) {
- // invalid tmpl path
- return;
- }
- if (def->isTagValue()) {
- // at "tag value", need to pop one more.
- if (pcomps.size() == 0) {
- // invalid path
+ if (pcomps.size() > 0) {
+ // not at root yet
+ def = _cstore->parseTmpl(pcomps, false);
+ if (!def.get()) {
+ // invalid tmpl path
return;
}
- pcomps.pop();
+ if (def->isTagValue()) {
+ // at "tag value", need to pop one more.
+ if (pcomps.size() == 0) {
+ // invalid path
+ return;
+ }
+ pcomps.pop();
+ }
}
process_ref(rcomps, pcomps, ERROR_TYPE);
} else if (cr_comp == "@@") {