Hi all,
Im going to write a daemon on my device and try to send a msg to another daemon via ubus.
Please check the attachment, there is my example code.
https://we.tl/t-8jlKji4mPL
First, if I use "ubus call videod forceIDR '{"stream":0}'" to try, always works.
root@OpenWrt:~# ubus call videod forceIDR '{"stream":0}'
{
"reply": "okay"
}
But, if daemon call ubus_invoke to ask forceIDR, sometimes daemon will be blocked at ubus_invoke.
What should I do to debug this problem? Please advice. Thanks.
Looks like another daemon already send "okay" back, but my example code still block at ubus_invoke.
-> 248dc5f2 #248dc5f2 hello: {}
<- 248dc5f2 #00000000 lookup: {"objpath":"videod"}
-> 248dc5f2 #00000000 data: {"objpath":"videod","objid":-1499974776,"objtype":-171350447,"signature":{"reload":{},"exit":{},"log":{"level":5},"forceIDR":{"stream":5}}}
-> 248dc5f2 #00000000 status: {"status":0}
<- 248dc5f2 #00000000 add_object: {"objpath":"ubusss","signature":{"reload":{},"exit":{},"log":{"level":5,"reply":3}}}
-> 7769213e #00000000 invoke: {"objid":-1183060278,"method":"ubus.object.add","data":{"id":874751477,"path":"ubusss"}}
-> 248dc5f2 #00000000 data: {"objid":874751477,"objtype":1884755329}
-> 248dc5f2 #00000000 status: {"status":0}
<- 7769213e #00000000 status: {"status":0,"objid":-1183060278}
<- 248dc5f2 #00000000 add_object: {}
-> 248dc5f2 #00000000 data: {"objid":-1762457707}
-> 248dc5f2 #00000000 status: {"status":0}
<- 248dc5f2 #a6983388 invoke: {"objid":-1499974776,"method":"forceIDR","data":{"stream":0}}
-> e440438f #248dc5f2 invoke: {"objid":-1499974776,"method":"forceIDR","data":{"stream":0},"user":"root","group":"root"}
<- e440438f #248dc5f2 data: {"objid":-1499974776,"data":{"reply":"okay"}}
-> 248dc5f2 #a6983388 data: {"objid":-1499974776,"data":{"reply":"okay"}}
<- e440438f #248dc5f2 status: {"status":0,"objid":-1499974776}
-> 248dc5f2 #a6983388 status: {"status":0,"objid":-1499974776}
<- e440438f #248dc5f2 status: {"status":0,"objid":-1499974776}
-> 248dc5f2 #a6983388 status: {"status":0,"objid":-1499974776}