diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-07-14 19:39:03 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-07-14 19:39:03 -0500 |
commit | fdac525b7596f1b18c201bdcd5923d3e76453ebd (patch) | |
tree | e045e128fe0846780af20b1f791e2a2db1107ad8 /src | |
parent | 5a58d5204307263b196349d791e5e5b4dd45f056 (diff) | |
download | vyatta-cfg-fdac525b7596f1b18c201bdcd5923d3e76453ebd.tar.gz vyatta-cfg-fdac525b7596f1b18c201bdcd5923d3e76453ebd.zip |
Bugfix 7331: better fix for the bug
Diffstat (limited to 'src')
-rw-r--r-- | src/cstore/cstore.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp index c86631b..b8ab82f 100644 --- a/src/cstore/cstore.cpp +++ b/src/cstore/cstore.cpp @@ -999,12 +999,10 @@ Cstore::commentCfgPath(const Cpath& args) } if (comment.find("CONFIGURATION COMMENTED OUT DURING MIGRATION BELOW") != string::npos){ // Don't allow users to set configuration migration comments - output_user("Cannot use the string 'CONFIGURATION COMMENTED OUT DURING MIGRATION BELOW' in a comment\n"); return false; } if (comment.find("CONFIGURATION COMMENTED OUT DURING MIGRATION ABOVE") != string::npos){ // Don't allow users to set configuration migration comments - output_user("Cannot use the string 'CONFIGURATION COMMENTED OUT DURING MIGRATION ABOVE' in a comment\n"); return false; } @@ -1826,7 +1824,11 @@ Cstore::loadFile(const char *filename) } for (size_t i = 0; i < com_list.size(); i++) { if (!commentCfgPath(com_list[i])) { - print_path_vec("Comment [", "] failed\n", com_list[i], "'"); + string comment = string(com_list[i][com_list[i].size()-1]); + if (comment.find("CONFIGURATION COMMENTED OUT DURING MIGRATION BELOW") == string::npos + && comment.find("CONFIGURATION COMMENTED OUT DURING MIGRATION ABOVE") == string::npos) { + print_path_vec("Comment [", "] failed\n", com_list[i], "'"); + } } } |