This commit is contained in:
13038267101 2024-02-27 11:46:50 +08:00
commit 4b458f9ee5
1 changed files with 14 additions and 1 deletions

View File

@ -4241,7 +4241,20 @@ int hg_scanner::wait_one_image_from_start(bool& handled)
get_scanner_paperon(has_paper);
if (has_paper == SANE_TRUE)
handled = false;
{
// for BUG-905: 设置了扫描指定张数属性后返回一次SCANNER_ERR_DEVICE_NO_PAPER
if (usb_img_index_ && scan_count_ != -1)
{
VLOG_MINI_2(LOG_LEVEL_DEBUG_INFO, "return SCANNER_ERR_DEVICE_NO_PAPER in start while scanning with given counts(%d) has finished (received %d papers/images)!\n", scan_count_, usb_img_index_);
usb_img_index_ = 0;
ret = SCANNER_ERR_DEVICE_NO_PAPER;
}
else
{
// 默认启动新一轮扫描
handled = false;
}
}
else
ret = SCANNER_ERR_DEVICE_NO_PAPER;
}