summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-03-06 17:46:04 +0100
committerJohn Crispin <blogic@openwrt.org>2015-03-06 17:46:23 +0100
commit47d5be7160e33966f5ded484232d10dcc220f172 (patch)
tree0909757acc977952f23a77345eafe2060e273cf2 /service
parentb6777a45becef915d6a99f01e044ad508bb278c6 (diff)
downloadunitd-47d5be7160e33966f5ded484232d10dcc220f172.tar
unitd-47d5be7160e33966f5ded484232d10dcc220f172.zip
json 0.12 fixes
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'service')
-rw-r--r--service/validate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/service/validate.c b/service/validate.c
index a33a48e..6a449f4 100644
--- a/service/validate.c
+++ b/service/validate.c
@@ -13,7 +13,7 @@
#include <libubox/blobmsg_json.h>
#include <libubox/avl-cmp.h>
-#include <json/json.h>
+#include <json-c/json.h>
#include "../procd.h"
@@ -53,12 +53,12 @@ service_validate_dump_all(struct blob_buf *b, char *p, char *s)
if (s && strcmp(s, v->type))
continue;
- o = json_object_object_get(r, v->package);
+ json_object_object_get_ex(r, v->package, &o);
if (!o) {
o = json_object_new_object();
json_object_object_add(r, v->package, o);
}
- t = json_object_object_get(o, v->type);
+ json_object_object_get_ex(o, v->type, &t);
if (!t) {
t = json_object_new_object();
json_object_object_add(o, v->type, t);