Make parse failure of local.conf non-fatal in case people have ancient files sitting around.

This commit is contained in:
Adam Ierymenko 2016-11-21 14:14:43 -08:00
parent 2e5de46584
commit 40078a99de

View File

@ -847,16 +847,10 @@ public:
try {
_localConfig = json::parse(lcbuf);
if (!_localConfig.is_object()) {
Mutex::Lock _l(_termReason_m);
_termReason = ONE_UNRECOVERABLE_ERROR;
_fatalErrorMessage = "invalid local.conf (content is not JSON object)";
return _termReason;
fprintf(stderr,"WARNING: unable to parse local.conf (root element is not a JSON object)" ZT_EOL_S);
}
} catch ( ... ) {
Mutex::Lock _l(_termReason_m);
_termReason = ONE_UNRECOVERABLE_ERROR;
_fatalErrorMessage = "invalid local.conf (JSON parse error)";
return _termReason;
fprintf(stderr,"WARNING: unable to parse local.conf (invalid JSON)" ZT_EOL_S);
}
}