设置错误时,method置为0

This commit is contained in:
gb 2022-10-13 15:34:01 +08:00
parent 758582d891
commit 328d33a1b8
1 changed files with 6 additions and 0 deletions

View File

@ -1491,9 +1491,15 @@ SANE_Status hg_sane_middleware::set_option(SANE_Handle h, SANE_Int option, SANE_
err = (scanner_err)SANE_INFO_RELOAD_OPTIONS;
}
else if (err == SCANNER_ERR_ACCESS_DENIED)
{
status = SANE_STATUS_ACCESS_DENIED;
err = (scanner_err)0;
}
else
{
status = SANE_STATUS_INVAL;
err = (scanner_err)0;
}
if (after_do)
*after_do = err;