调整获取锁定

This commit is contained in:
13038267101 2022-11-24 23:34:38 +08:00
parent d5c10471f7
commit 99bb4564b5
1 changed files with 4 additions and 1 deletions

View File

@ -1635,6 +1635,7 @@ int hg_scanner_239::set_scan_islock(SANE_Bool set_islock)
int val = 0,
ret = write_register(setting3399::SR_SET_LOCK_STATES, set_islock);
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "Set scanner is lock:%d\r\n", set_islock);
if (ret != SCANNER_ERR_OK)
return ret;
@ -1650,8 +1651,10 @@ int hg_scanner_239::get_scan_islock(SANE_Bool& islock)
if (ret != SCANNER_ERR_OK)
return ret;
ret = islock ? SCANNER_ERR_DEVICE_ISLOCK : SCANNER_ERR_OK;
islock = val;
ret = islock ? SCANNER_ERR_DEVICE_ISLOCK : SCANNER_ERR_OK;
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "Get scanner is lock:%d\r\n", ret);
return ret;
}