调整pop_first_image调用位置,避免死锁
This commit is contained in:
parent
5f078d3a77
commit
95ac953da3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue