ubusd: move global retmsg per client
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 7 Jun 2017 11:09:31 +0000 (14:09 +0300)
committerFelix Fietkau <nbd@nbd.name>
Mon, 13 Nov 2017 09:09:28 +0000 (10:09 +0100)
commit5f87f5480ebf004d735dbf44259d08cf8affd305
treeddfede28b10badb205e1411e8b2c8376517397b5
parent27d712d394a0086ff68b83de26ded70ab28d1757
ubusd: move global retmsg per client

Even with the tx_queue-ing issue resolved, what
seems to happen afterwards, is that all the messages
seems to get through, but the client still loops
in the `ubus_complete_request()` waiting for
`req->status_msg` or for a timeout.

Though, the timeout does not seem to happen, because
the data is processed in `ubus_poll_data()`, with
a infinite poll() timeout (ubus_complete_request() is
called with timeout 0).

It's likely that either the `seq` or `peer` sent from
ubusd are wrong, and the client cannot get the correct
ubus request in `ubus_process_req_msg()`.
I haven't digged too deep into this ; setting the
`retmsg` object on the client struct seems to have
resolved any hanging with the `ubus list` command.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [fix placement of retmsg in cl]
ubusd.h
ubusd_proto.c