summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2019-01-07 11:19:50 -0800
committerGrant Limberg <grant.limberg@zerotier.com>2019-01-07 11:19:50 -0800
commitb59c4a2106ad17d92c15c086c31d5764a0462c16 (patch)
treefadb2783f2708c4cacbc868bd2ed3ef847c84687 /service
parentc35933cd1eae7b0881ccd63edbca3afb4c72b771 (diff)
downloadinfinitytier-b59c4a2106ad17d92c15c086c31d5764a0462c16.tar.gz
infinitytier-b59c4a2106ad17d92c15c086c31d5764a0462c16.zip
Print error & exit on local.conf parsing error
Diffstat (limited to 'service')
-rw-r--r--service/OneService.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 84d801db..69bbfeb0 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -1035,10 +1035,12 @@ public:
try {
_localConfig = OSUtils::jsonParse(lcbuf);
if (!_localConfig.is_object()) {
- fprintf(stderr,"WARNING: unable to parse local.conf (root element is not a JSON object)" ZT_EOL_S);
+ fprintf(stderr,"ERROR: unable to parse local.conf (root element is not a JSON object)" ZT_EOL_S);
+ exit(1);
}
} catch ( ... ) {
- fprintf(stderr,"WARNING: unable to parse local.conf (invalid JSON)" ZT_EOL_S);
+ fprintf(stderr,"ERROR: unable to parse local.conf (invalid JSON)" ZT_EOL_S);
+ exit(1);
}
}