Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH libubox 2/3] loop: make uloop_run() return the cancelling signal

2016-06-20 Thread Matthias Schiffer
On 06/20/2016 09:59 AM, Matthias Schiffer wrote: > When a process quits in response to a signal it handles, it should to so > be re-sending the signal to itself. This especially important for SIGINT, > as is explained in [1]. > > uloop currently hides the reason for quitting uloop_run(). Fix this

[OpenWrt-Devel] [PATCH libubox 3/3] blobmsg_json: add new functions blobmsg_format_json_value*

2016-06-20 Thread Matthias Schiffer
The current blobmsg_format_json* functions will return invalid JSON when the "list" argument is given as false (blobmsg_format_element() will output the name of the blob_attr as if the value is printed as part of a JSON object). To avoid breaking software relying on this behaviour, introduce new f

[OpenWrt-Devel] [PATCH libubox 1/3] Fix various memory management issues

2016-06-20 Thread Matthias Schiffer
Consistently handle allocation failures. Some functions are changed to return bool instead of void to allow returning an error. Also fix a buffer size miscalculation in lua/uloop. Signed-off-by: Matthias Schiffer --- blobmsg.c | 20 +++- blobmsg.h | 4 ++-- blobmsg_js

[OpenWrt-Devel] [PATCH libubox 2/3] loop: make uloop_run() return the cancelling signal

2016-06-20 Thread Matthias Schiffer
When a process quits in response to a signal it handles, it should to so be re-sending the signal to itself. This especially important for SIGINT, as is explained in [1]. uloop currently hides the reason for quitting uloop_run(). Fix this by returning the signal that caused the loop to quit (or 0