调整INT缓冲区大小;启动扫描后初始化状态为OK

This commit is contained in:
gb 2022-08-06 14:18:53 +08:00
parent dfeaa6b35c
commit 4eee6b3335
2 changed files with 2 additions and 1 deletions

View File

@ -733,6 +733,7 @@ void hg_scanner::thread_handle_image_process(void)
void hg_scanner::working_begin(void*) void hg_scanner::working_begin(void*)
{ {
final_img_index_ = 0; final_img_index_ = 0;
status_ = SCANNER_ERR_OK;
notify_ui_working_status(STATU_DESC_SCAN_WORKING, SANE_EVENT_WORKING, SCANNER_ERR_OK); notify_ui_working_status(STATU_DESC_SCAN_WORKING, SANE_EVENT_WORKING, SCANNER_ERR_OK);
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "[%s] scanning ...\n", hg_log::current_time().c_str()); VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "[%s] scanning ...\n", hg_log::current_time().c_str());
} }

View File

@ -1246,7 +1246,7 @@ int hg_scanner_402::read_one_image_from_usb(SANE_Image_Statu statu)
} }
void hg_scanner_402::discard_all_images(void) void hg_scanner_402::discard_all_images(void)
{ {
char buf[64]; char buf[32];
HGEIntInfo* info = (HGEIntInfo*)buf; HGEIntInfo* info = (HGEIntInfo*)buf;
int size = sizeof(buf), int size = sizeof(buf),
oto = 0, oto = 0,