[OpenWrt-Devel] [PATCH][libubox] ustream-fd: handle uloop errors

Felix Fietkau nbd at openwrt.org
Fri Jul 10 07:26:24 EDT 2015


On 2015-07-10 09:23, Philip Craig wrote:
> Otherwise uloop will delete the fd and the ustream will receive no
> notification of the error.
> 
> Signed-off-by: Philip Craig <philipjcraig at gmail.com>
I think this fix is incomplete. When an error occurs, ustream-fd should
delete the fd after setting the error flags to avoid getting further
spurious error calls.
ustream_fd_set_uloop should probably recognize the case of both
ULOOP_READ and ULOOP_WRITE being unset and should call uloop_fd_delete
in that case.
__ustream_fd_poll should probably call ustream_fd_set_uloop when setting
an error flag.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list