From 52f442909bb117f5dca4a9bc39362340d2ccb5c1 Mon Sep 17 00:00:00 2001 From: yuanyulu Date: Mon, 23 Oct 2023 14:06:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AF=BC=E8=87=B4=E4=BB=BB=E5=8A=A1=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=8A=B6=E6=80=81=E5=8D=A1=E4=BD=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20Signed-off-by:yuanyulu@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuanyulu --- services/src/print_service_ability.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/src/print_service_ability.cpp b/services/src/print_service_ability.cpp index 27e81aa3..751f0971 100644 --- a/services/src/print_service_ability.cpp +++ b/services/src/print_service_ability.cpp @@ -747,8 +747,8 @@ int32_t PrintServiceAbility::CancelPrintJob(const std::string &jobId) auto cbFunc = extCallbackMap_[cid]; auto tmpPrintJob = queuedJobList_[jobId]; auto callback = [=]() { - if (cbFunc != nullptr) { - cbFunc->OnCallback(*tmpPrintJob); + if (cbFunc != nullptr && cbFunc->OnCallback(*tmpPrintJob) == false { + UpdatePrintJobState(jobId, PRINT_JOB_COMPLETED, PRINT_JOB_COMPLETED_CANCELLED); } }; if (helper_->IsSyncMode()) { -- Gitee From 0890c5c340dd770af4089e7ae4ebd7880064c285 Mon Sep 17 00:00:00 2001 From: yuanyulu Date: Mon, 23 Oct 2023 14:08:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AF=BC=E8=87=B4=E4=BB=BB=E5=8A=A1=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=8A=B6=E6=80=81=E5=8D=A1=E4=BD=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20Signed-off-by:yuanyulu@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuanyulu --- services/src/print_service_ability.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/src/print_service_ability.cpp b/services/src/print_service_ability.cpp index 751f0971..508d6c85 100644 --- a/services/src/print_service_ability.cpp +++ b/services/src/print_service_ability.cpp @@ -747,7 +747,7 @@ int32_t PrintServiceAbility::CancelPrintJob(const std::string &jobId) auto cbFunc = extCallbackMap_[cid]; auto tmpPrintJob = queuedJobList_[jobId]; auto callback = [=]() { - if (cbFunc != nullptr && cbFunc->OnCallback(*tmpPrintJob) == false { + if (cbFunc != nullptr && cbFunc->OnCallback(*tmpPrintJob) == false) { UpdatePrintJobState(jobId, PRINT_JOB_COMPLETED, PRINT_JOB_COMPLETED_CANCELLED); } }; -- Gitee