X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=libubus-req.c;h=2197f2a9fdd997183a3f641653be5e071d5af478;hp=ebc580684eb0f1e20fa197f96f5538010ca5e3c2;hb=e59b44573423ad608d0752b46a6073222db9ed45;hpb=3e45a782b22c067eab125b377474f5da11eabbe9 diff --git a/libubus-req.c b/libubus-req.c index ebc5806..2197f2a 100644 --- a/libubus-req.c +++ b/libubus-req.c @@ -153,6 +153,7 @@ int ubus_complete_request(struct ubus_context *ctx, struct ubus_request *req, timeout = time_end - get_time_msec(); if (timeout <= 0) { ubus_set_req_status(req, UBUS_STATUS_TIMEOUT); + uloop_cancelled = cancelled; break; } } @@ -174,7 +175,7 @@ int ubus_complete_request(struct ubus_context *ctx, struct ubus_request *req, if (!registered) { uloop_fd_delete(&ctx->sock); - if (ctx->stack_depth) + if (!ctx->stack_depth) ctx->pending_timer.cb(&ctx->pending_timer); }