ubusd: fix sending remove-object notification
authorFelix Fietkau <nbd@nbd.name>
Tue, 23 Aug 2016 10:55:08 +0000 (12:55 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 23 Aug 2016 10:55:09 +0000 (12:55 +0200)
commit686c05d738a7a1f7ec62c47807f07f6f642904b1
treec320402d7a6726963a7299c233bfe2c645d4a855
parentb405050ceb53a0f7fce5a3e0958b6e5406e9225b
ubusd: fix sending remove-object notification

Patch by Delio Brignoli <brignoli.delio@gmail.com>

Both ubusd_free_object (eventually via ubusd_create_object_event_msg)
and ubus_proto_send_msg_from_blob() use the same message buffer.
So ubusd_handle_remove_object builds the payload which gets (indirectly)
overwritten by the call to ubusd_free_object and then sent again by
ubus_proto_send_msg_from_blob.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
ubusd_proto.c