Hi all,
I use ubus on my device with openwrt firmware.
There are two daemons, A and B.
At both daemons, we will add A/B into ubus via ubus_add_object, and we can use ubus command to list/call methods, anything looks good.
Today, I try to implement a function that A can call B's method, please check following code.
uint32_t id;
blob_buf_init(&blob, 0);
blobmsg_add_u32(&blob, "stream", stream);
if (ubus_lookup_id(ctx, "B", &id)) {
warn("Failed to look up B object\n");
break;
}
ubus_invoke(ctx, id, "forceIDR", blob.head, NULL, NULL, 0);
If I use command line to do, the result is
root@OpenWrt:/# ubus call B forceIDR '{"stream":0}'
{
"reply": "okay"
}
Since daemon A don't need the result from B, so I set callback/args as NULL.
And daemon A is quite easy to block at ubus_invoke, why?
Anything I can trace or debug? Please help. Thanks.