diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-11-19 15:20:42 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-11-19 15:20:42 -0800 |
commit | d2b89eee76f52303c6d88ff04a2fcf030e5a9e2c (patch) | |
tree | 8de4685abd41aaa11a1c4c972c152ae240dc8b41 | |
parent | 6221c9a70e90d7e9c369f1c81f7a377f48ab7d3a (diff) | |
download | vyatta-cfg-d2b89eee76f52303c6d88ff04a2fcf030e5a9e2c.tar.gz vyatta-cfg-d2b89eee76f52303c6d88ff04a2fcf030e5a9e2c.zip |
fix for bug 6448
* fix leaf node value diff output.
-rw-r--r-- | src/cnode/cnode-algorithm.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 { |