ubusd: fix incomplete copy of shared buf during queue-ing
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Thu, 2 Feb 2017 15:59:49 +0000 (17:59 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 7 Feb 2017 09:45:14 +0000 (10:45 +0100)
commitc09e4f06f0f54be8304fb4459445198920fea32e
tree41a81b3ec27c4223b08476a4a30f222a1f1d6935
parent91acde66b963e238aba35fb4f2030a147df84cd4
ubusd: fix incomplete copy of shared buf during queue-ing

For a shared ubus_msg_buf, the ubus_msg_ref function will
create a copy for queue-ing.

Problem is, that during the dequeue (especially) in client_cb,
the header is 0-ed (because it's was a newly alloc-ed buffer).

And during ubus_msg_writev(), the header info will be ignored
by the client.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
ubusd.c