diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-07-03 23:39:21 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-07-04 00:06:43 +0200 |
commit | 7fd4564b8acb60254817cb341b84c6468c8c6440 (patch) | |
tree | ce84990dccd99f7a39bc4320cfc2be4c2b55b143 | |
parent | 3c55504336eb04a779515f0acff8ecbeea4a3d53 (diff) | |
download | rpcd-7fd4564b8acb60254817cb341b84c6468c8c6440.tar.gz |
plugin: fix parsing libexec plugin output
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r-- | plugin.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -108,12 +108,9 @@ rpc_plugin_call_finish_cb(struct blob_buf *blob, int stat, void *priv) { if (c->obj) { - if (json_object_get_type(c->obj) == json_type_object || - json_object_get_type(c->obj) == json_type_array) - { - blobmsg_add_json_element(blob, NULL, c->obj); + if (json_object_get_type(c->obj) == json_type_object && + blobmsg_add_object(blob, c->obj)) rv = UBUS_STATUS_OK; - } json_object_put(c->obj); } |