only dump messages if loading was successful

This commit is contained in:
john30
2015-02-21 18:58:29 +01:00
parent a0d0092082
commit 564a602eaf
+2 -2
View File
@@ -530,9 +530,9 @@ int main(int argc, char* argv[])
if (opt.checkConfig) {
logNotice(lf_main, "Performing configuration check...");
loadConfigFiles(&templates, &messages, true);
result_t result = loadConfigFiles(&templates, &messages, true);
if (opt.checkConfig > 1) {
if (result == RESULT_OK && opt.checkConfig > 1) {
logNotice(lf_main, "Configuration dump:");
messages.dump(cout);
}