uhttpd: fix crashes in the ubus plugin
authorFelix Fietkau <nbd@openwrt.org>
Thu, 21 Nov 2013 21:50:30 +0000 (22:50 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 21 Nov 2013 21:50:31 +0000 (22:50 +0100)
commitcd66639800ee2882a0867ec54868502eb9b893d8
treeb1fae68cc97bab2407e7b8584d39bc664a37fd92
parentaec143997b9aba65f7ea702d7cd42b553afe335f
uhttpd: fix crashes in the ubus plugin

The ubus plugin calls blocking ubus functions that loop back into
uloop_run. Protect the client data structure with refcounting to ensure
that the outer uloop_run call does not clean up the data that the inner
uloop_run call is still processing.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
client.c
ubus.c
uhttpd.h
utils.c