From: Rafał Miłecki Date: Wed, 15 Feb 2017 09:18:18 +0000 (+0100) Subject: Print error if parsing service JSON fails X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5ad3a5ef5ed97b165abcc0b9b0ee57bcf14378f2;p=oweals%2Fmdnsd.git Print error if parsing service JSON fails Signed-off-by: Rafał Miłecki --- diff --git a/service.c b/service.c index 588daf3..f21578d 100644 --- a/service.c +++ b/service.c @@ -255,9 +255,12 @@ service_load(char *path) for (i = 0; i < gl.gl_pathc; i++) { blob_buf_init(&b, 0); - if (blobmsg_add_json_from_file(&b, gl.gl_pathv[i])) + if (blobmsg_add_json_from_file(&b, gl.gl_pathv[i])) { blob_for_each_attr(cur, b.head, rem) service_load_blob(cur); + } else { + fprintf(stderr, "Error reading %s JSON\n", gl.gl_pathv[i]); + } } globfree(&gl); }