libubus: fix deferring invoke processing for non-uloop usage
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
bbd3fbc9cc
commit
3869e0ca07
2 changed files with 7 additions and 2 deletions
|
@ -171,9 +171,13 @@ int ubus_complete_request(struct ubus_context *ctx, struct ubus_request *req,
|
|||
if (req->complete_cb)
|
||||
req->complete_cb(req, status);
|
||||
|
||||
if (!registered)
|
||||
if (!registered) {
|
||||
uloop_fd_delete(&ctx->sock);
|
||||
|
||||
if (ctx->stack_depth)
|
||||
ctx->pending_timer.cb(&ctx->pending_timer);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,8 @@ ubus_queue_msg(struct ubus_context *ctx, struct ubus_msghdr *hdr)
|
|||
|
||||
memcpy(&pending->hdr, hdr, sizeof(*hdr) + blob_raw_len(ubus_msghdr_data(hdr)));
|
||||
list_add(&pending->list, &ctx->pending);
|
||||
uloop_timeout_set(&ctx->pending_timer, 1);
|
||||
if (ctx->sock.registered)
|
||||
uloop_timeout_set(&ctx->pending_timer, 1);
|
||||
}
|
||||
|
||||
void __hidden
|
||||
|
|
Loading…
Reference in a new issue