diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-11-04 18:34:30 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-11-04 18:34:30 -0700 |
commit | 1e1d0de703f3c7a7e1b6af0d984a736573759ad7 (patch) | |
tree | 00d5c4a7d801d1bcb6306beb961bfecd31b96596 /src/cstore/cstore-node.cpp | |
parent | b979a051f8cf987edba889e812863260f73e8312 (diff) | |
download | vyatta-cfg-1e1d0de703f3c7a7e1b6af0d984a736573759ad7.tar.gz vyatta-cfg-1e1d0de703f3c7a7e1b6af0d984a736573759ad7.zip |
add session assertion for API functions
* enforce session for API functions requiring it.
Diffstat (limited to 'src/cstore/cstore-node.cpp')
-rw-r--r-- | src/cstore/cstore-node.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cstore/cstore-node.cpp b/src/cstore/cstore-node.cpp index a67f291..04e774e 100644 --- a/src/cstore/cstore-node.cpp +++ b/src/cstore/cstore-node.cpp @@ -109,8 +109,11 @@ CstoreCfgNode::CstoreCfgNode(Cstore& cstore, vector<string>& path_comps, // handle comment string ac_str; bool ac = _cstore->cfgPathGetComment(path_comps, ac_str, true); - string wc_str; - bool wc = _cstore->cfgPathGetComment(path_comps, wc_str, false); + string wc_str = ac_str; + bool wc = ac; + if (!_active_only) { + wc = _cstore->cfgPathGetComment(path_comps, wc_str, false); + } if (ac) { if (wc) { // has comment in both active and working |