summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog12
-rw-r--r--src/cnode/cnode-algorithm.cpp5
-rw-r--r--src/cstore/cstore-varref.cpp4
3 files changed, 18 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 9fceb07..4080b24 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+vyatta-cfg (0.18.32) unstable; urgency=low
+
+ * fix for bug 6448
+
+ -- An-Cheng Huang <ancheng@vyatta.com> Fri, 19 Nov 2010 15:21:13 -0800
+
+vyatta-cfg (0.18.31) unstable; urgency=low
+
+ * fix existence check in "syntax" when builtin expression is used.
+
+ -- An-Cheng Huang <ancheng@vyatta.com> Fri, 19 Nov 2010 14:48:08 -0800
+
vyatta-cfg (0.18.30) unstable; urgency=low
* remove parser debug output and move existence check.
diff --git a/src/cnode/cnode-algorithm.cpp b/src/cnode/cnode-algorithm.cpp
index 405ab4f..fa3912c 100644
--- a/src/cnode/cnode-algorithm.cpp
+++ b/src/cnode/cnode-algorithm.cpp
@@ -180,7 +180,7 @@ _diff_check_and_show_leaf(CfgNode *cfg1, CfgNode *cfg2, int level,
// need to actually do a diff.
// this follows the original perl logic.
const vector<string>& ovec = cfg1->getValues();
- const vector<string>& nvec = cfg1->getValues();
+ const vector<string>& nvec = cfg2->getValues();
vector<string> values;
vector<const char *> pfxs;
Cstore::MapT<string, bool> nmap;
@@ -217,9 +217,10 @@ _diff_check_and_show_leaf(CfgNode *cfg1, CfgNode *cfg2, int level,
} else {
// single-value node
if (show_def || !cfg->isDefault()) {
- const string& val = cfg->getValue();
+ string val = cfg->getValue();
if (!force_pfx_diff) {
const string& val1 = cfg1->getValue();
+ val = cfg2->getValue();
if (val == val1) {
force_pfx_diff = PFX_DIFF_NONE.c_str();
} else {
diff --git a/src/cstore/cstore-varref.cpp b/src/cstore/cstore-varref.cpp
index 02bdb97..ac80ba2 100644
--- a/src/cstore/cstore-varref.cpp
+++ b/src/cstore/cstore-varref.cpp
@@ -238,7 +238,9 @@ Cstore::VarRef::getValue(string& value, vtw_type_e& def_type)
}
if (_paths[i].second == ERROR_TYPE
&& !_cstore->cfgPathExists(_paths[i].first, _active)) {
- // path doesn't exist
+ // path doesn't exist => empty string
+ added[""] = true;
+ result.push_back("");
continue;
}
if (_paths[i].second != ERROR_TYPE) {