diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-19 15:30:34 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-19 15:30:34 -0800 |
commit | 39b7704d70df29cbd0a7a50eb851d7c5fb3afe2b (patch) | |
tree | bde7c891e513069b097fc1379752ad020a51aa9a | |
parent | 4ab2de09d4a5985fb1dd3cb59908934a64ae7571 (diff) | |
parent | 9ed305de8fc62e8ee17627f85e7d3efc82719b78 (diff) | |
download | vyatta-cfg-39b7704d70df29cbd0a7a50eb851d7c5fb3afe2b.tar.gz vyatta-cfg-39b7704d70df29cbd0a7a50eb851d7c5fb3afe2b.zip |
Merge branch 'mendocino' of suva.vyatta.com:/git/vyatta-cfg into mendocino
-rw-r--r-- | debian/changelog | 18 | ||||
-rw-r--r-- | src/cnode/cnode-algorithm.cpp | 5 | ||||
-rw-r--r-- | src/commit2.c | 2 | ||||
-rw-r--r-- | src/cstore/cstore-varref.cpp | 4 |
4 files changed, 25 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 9fceb07..e0bc9ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +vyatta-cfg (0.18.33) unstable; urgency=low + + * proper exit on failure. + + -- Michael <mike@vyatta.com> Fri, 19 Nov 2010 07:30:20 -0800 + +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/commit2.c b/src/commit2.c index e1119b4..aeb9ce7 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -401,7 +401,7 @@ main(int argc, char** argv) //remove tmp changes file as all the work is now done unlink(COMMIT_CHANGES_FILE); - exit (errors == 2); + exit (errors == 2 ? 0 : 1); } 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) { |