From 1d91cb3e13d8e8bf6b77b901eb7f4a42195610fc Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Tue, 27 Feb 2024 16:25:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8F=96=E6=B6=88=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E4=B8=A2=E5=9B=BE=E9=97=AE=E9=A2=98=EF=BC=9BBUG-906?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/sane_user/HGSaneImpl.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/sane_user/HGSaneImpl.cpp b/modules/sane_user/HGSaneImpl.cpp index 62b5de06..d2527071 100644 --- a/modules/sane_user/HGSaneImpl.cpp +++ b/modules/sane_user/HGSaneImpl.cpp @@ -1100,16 +1100,8 @@ void HGAPI HGSaneDeviceImpl::ThreadFunc(HGThread thread, HGPointer param) if (readSize != params.bytes_per_line * params.lines) { free(buffer); - if (p->m_cancelScan) - { - if (NULL != p->m_scanNotify) - p->m_scanNotify((int)SANE_EVENT_SCAN_FINISHED, (void*)saneAPI.sane_strstatus_api(SANE_STATUS_CANCELLED), (int)SANE_STATUS_CANCELLED); - } - else - { - if (NULL != p->m_scanNotify) - p->m_scanNotify((int)SANE_EVENT_SCAN_FINISHED, (void*)saneAPI.sane_strstatus_api(SANE_STATUS_IO_ERROR), (int)SANE_STATUS_IO_ERROR); - } + if (NULL != p->m_scanNotify) + p->m_scanNotify((int)SANE_EVENT_SCAN_FINISHED, (void*)saneAPI.sane_strstatus_api(SANE_STATUS_IO_ERROR), (int)SANE_STATUS_IO_ERROR); break; } }