This commit is contained in:
13038267101 2023-05-25 09:10:08 +08:00
commit 6cea8a7632
1 changed files with 4 additions and 1 deletions

View File

@ -543,6 +543,7 @@ int hg_scanner_302::read_one_image_from_usb(SANE_Image_Statu statu)
total = get_front_data_size(),
off = 0,
ret = SCANNER_ERR_OK;
bool popimg = false;
VLOG_MINI_1(LOG_LEVEL_ALL, "New image size: %u\n", total);
if (!waiting_for_memory_enough(total))
@ -600,7 +601,7 @@ int hg_scanner_302::read_one_image_from_usb(SANE_Image_Statu statu)
ret = save_usb_data(buf);
if (ret == SCANNER_ERR_OK)
{
pop_first_image();
popimg = true;
}
else
{
@ -617,6 +618,8 @@ int hg_scanner_302::read_one_image_from_usb(SANE_Image_Statu statu)
VLOG_MINI_1(LOG_LEVEL_FATAL, "write command SR_IM_TX failed: %s\n", hg_scanner_err_name(ret));
}
}
if(popimg)
pop_first_image();
return ret;
}