projects
/
oweals
/
rpcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c55504
)
plugin: fix parsing libexec plugin output
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 3 Jul 2014 21:39:21 +0000
(23:39 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 3 Jul 2014 22:06:43 +0000
(
00:06
+0200)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
plugin.c
patch
|
blob
|
history
diff --git
a/plugin.c
b/plugin.c
index 687944d672d8cd6c383ba11fe4c09b781cb03f21..b75241aae1f82ce0a84b5d40c1c74b2e8c0577ed 100644
(file)
--- a/
plugin.c
+++ b/
plugin.c
@@
-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);
}