Hi,
> In case of previous setup or calling flow ctx->cancel_poll is set to true
> function ubus_handle_event may process ONLY ONE request, though the comment
> says it processes events:
>
> /* call this for read events on ctx->sock.fd when not using uloop */ static
> inline void ubus_handle_event(struct ubus_context *ctx) {
> ctx->sock.cb(&ctx->sock, ULOOP_READ); }
>
> In case if I would manually poll the ubus fd and do not use uloop to poll
> it and after that it may process ONE event and the rest will be processed
> on the next loop cycle. I would like to have a function that guarantees
> that every request will be processed in a single call to
> ubus_haubus_handle_eventndle_event.You're already using a foreign event loop / IO notification mechanism, you already have means to determine socket read readiness. Invoking a library function that does it's own polling internally with arbitrary, uncontrollable timeouts does not seem like a good design. It would be better to implement a function that simply keeps calling `get_next_msg(ctx, &recv_fd)` and `ubus_process_msg(ctx, &ctx->msgbuf, recv_fd);` until `get_next_msg()` yields false. ~ Jo
signature.asc
Description: OpenPGP digital signature
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
