mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-13 20:50:19 +01:00
bbfdmd: complete deferred requests when async invoke setup fails
This commit is contained in:
parent
12228596e3
commit
e812df49fa
2 changed files with 3 additions and 3 deletions
|
|
@ -350,12 +350,13 @@ static int bbfdm_handler_async(struct ubus_context *ctx, struct ubus_object *obj
|
|||
if (!service_path_match(context->requested_path, requested_proto, service))
|
||||
continue;
|
||||
|
||||
context->path_matched = true;
|
||||
run_async_call(context, service, msg);
|
||||
}
|
||||
|
||||
context->service_list_processed = true;
|
||||
|
||||
if (context->path_matched == false)
|
||||
if (context->pending_requests == 0)
|
||||
send_response(context);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -194,8 +194,6 @@ void run_async_call(struct async_request_context *ctx, service_entry_t *service,
|
|||
|
||||
tracker->ctx = ctx;
|
||||
tracker->service = service;
|
||||
ctx->pending_requests++;
|
||||
ctx->path_matched = true;
|
||||
|
||||
memset(&req_buf, 0, sizeof(struct blob_buf));
|
||||
blob_buf_init(&req_buf, 0);
|
||||
|
|
@ -220,6 +218,7 @@ void run_async_call(struct async_request_context *ctx, service_entry_t *service,
|
|||
uloop_timeout_cancel(&tracker->timeout);
|
||||
BBFDM_FREE(tracker);
|
||||
} else {
|
||||
ctx->pending_requests++;
|
||||
tracker->async_request.data_cb = ubus_result_callback;
|
||||
tracker->async_request.complete_cb = ubus_request_complete;
|
||||
ubus_complete_request_async(ctx->ubus_ctx, &tracker->async_request);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue