projects
/
project
/
mdnsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a957c3e
)
Print error if parsing service JSON fails
author
Rafał Miłecki
<rafal@milecki.pl>
Wed, 15 Feb 2017 09:18:18 +0000
(10:18 +0100)
committer
Rafał Miłecki
<rafal@milecki.pl>
Wed, 15 Feb 2017 09:18:52 +0000
(10:18 +0100)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
service.c
patch
|
blob
|
history
diff --git
a/service.c
b/service.c
index 588daf351a787177e67ce58a2458beeaf757dfa4..f21578d00caa38e98e7e0f262a98af5785338c33 100644
(file)
--- 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);
}