mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-21 05:53:09 +00:00
Make parse failure of local.conf non-fatal in case people have ancient files sitting around.
This commit is contained in:
parent
2e5de46584
commit
40078a99de
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user