This commit is contained in:
13038267101 2023-03-06 15:35:58 +08:00
parent 53d1853a08
commit c04af77090
1 changed files with 10 additions and 13 deletions

View File

@ -592,15 +592,13 @@ public:
auto it = test_map_.find(name);
if (it != test_map_.end())
{
ret = (this->*test_map_[name])((void *)oper);
}
else
if (it == test_map_.end())
{
helper_->test_callback(name, ui_helper::TEST_EVENT_NOT_FIND_TEST, NULL, false);
return ret;
}
ret = (this->*test_map_[name])((void*)oper);
if (ret == SCANNER_ERR_DEVICE_NOT_SUPPORT
|| ret == SCANNER_ERR_IO
|| ret == SCANNER_ERR_TIMEOUT
@ -1165,7 +1163,10 @@ public:
unsigned int len = sizeof(SANE_Int);
int ret = helper_->io_control(IO_CTRL_CODE_SET_CLEAR_HISTORY_COUNT, NULL, NULL);
ret = helper_->io_control(IO_CTRL_CODE_GET_HISTORY_SCAN_NUM, &num, &len);
if (ret != SCANNER_ERR_OK)
{
return ret;
}
if ((num == 0 && num != -1))
{
type = true;
@ -1174,7 +1175,7 @@ public:
else
{
type = false;
info = L"清除历史计数失败";
info = L"清除历史计数失败";
}
helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)info, type);
@ -1353,13 +1354,9 @@ DECL_API(int) func_test_go(const wchar_t* NAME, const wchar_t* oper, ui_helper*
SANE_Bool type = false;
unsigned int len = sizeof(SANE_Bool);
test ts(helper);
ret = ts.set_test(NAME, oper);
if (ret != SCANNER_ERR_OK)
{
return ret;
}
//ret = helper->io_control(IO_CTRL_CODE_RESTORE_SETTINGS, NULL, NULL);//结束恢复默认
return ret;
return ts.set_test(NAME, oper);
}
DECL_API(int) func_test_uninit(void* uninit)
{