aboutsummaryrefslogtreecommitdiff
path: root/src/survive.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2016-12-20 23:36:55 -0500
committercnlohr <lohr85@gmail.com>2016-12-20 23:36:55 -0500
commit170219fe413602508b31c39df23c8938adc6c35f (patch)
treea3a955f85472f8888e2837eff821e2dc1f2219e8 /src/survive.c
parent093802f9cc7ebaa0bfe8d862766e7e08026576f0 (diff)
downloadlibsurvive-170219fe413602508b31c39df23c8938adc6c35f.tar.gz
libsurvive-170219fe413602508b31c39df23c8938adc6c35f.tar.bz2
get the new disambiguator closer, but it's still not perfect.
Diffstat (limited to 'src/survive.c')
-rw-r--r--src/survive.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/survive.c b/src/survive.c
index 73df29d..7ad2ae9 100644
--- a/src/survive.c
+++ b/src/survive.c
@@ -92,12 +92,12 @@ static int LoadConfig( struct SurviveContext * ctx, struct SurviveObject * so, i
int i;
int r = jsmn_parse(&p, ct0conf, len, t, sizeof(t)/sizeof(t[0]));
if (r < 0) {
- SV_ERROR("Failed to parse JSON in HMD configuration: %d\n", r);
- return 0;
+ SV_INFO("Failed to parse JSON in HMD configuration: %d\n", r);
+ return -1;
}
if (r < 1 || t[0].type != JSMN_OBJECT) {
- SV_ERROR("Object expected in HMD configuration\n");
- return 0;
+ SV_INFO("Object expected in HMD configuration\n");
+ return -2;
}
for (i = 1; i < r; i++) {
@@ -166,8 +166,8 @@ struct SurviveContext * survive_init()
//Next, pull out the config stuff.
if( LoadConfig( ctx, &ctx->headset, 1, 0, 0 ) ) goto fail_gracefully;
- if( LoadConfig( ctx, &ctx->watchman[0], 2, 0, 1 ) ) goto fail_gracefully;
- if( LoadConfig( ctx, &ctx->watchman[1], 3, 0, 1 ) ) goto fail_gracefully;
+ if( LoadConfig( ctx, &ctx->watchman[0], 2, 0, 1 ) ) { SV_INFO( "Watchman 0 config issue." ); }
+ if( LoadConfig( ctx, &ctx->watchman[1], 3, 0, 1 ) ) { SV_INFO( "Watchman 1 config issue." ); }
/*
int i;