From c4e95f525fb2407e075862d9e676b0920cffa624 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Fri, 17 Apr 2020 16:11:35 +0900 Subject: [PATCH] Allow cancel request when download state is paused download-provider cannot be terminated in case of below scenario. 1. application requests a pause. 2. download-provider pauses the download request. 3. application requests a cancel. 4. the download request couldn't be canceled because a state is paused. 5. http thread is alive constantly. Change-Id: I7b2566bce98b3e563e2b5980c908a92140ffdcd9 --- provider/download-provider-client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/provider/download-provider-client.c b/provider/download-provider-client.c index fab58ff..07a065a 100755 --- a/provider/download-provider-client.c +++ b/provider/download-provider-client.c @@ -1642,7 +1642,8 @@ static int __dp_request_controls(dp_client_slots_fmt *slot, dp_ipc_fmt *ipc_info if (requestp->state == DP_STATE_QUEUED) { dp_queue_manager_clear_queue(requestp); } else if (requestp->state == DP_STATE_CONNECTING || - requestp->state == DP_STATE_DOWNLOADING) { + requestp->state == DP_STATE_DOWNLOADING || + requestp->state == DP_STATE_PAUSED) { if (__dp_call_cancel_agent(requestp) < 0) TRACE_ERROR("failed to cancel download(%d) id:%d", requestp->agent_id, ipc_info->id); } -- 2.7.4