Merge branch 'dev' of http://192.168.10.5:8099/sane/code_device into dev
This commit is contained in:
commit
fd3de04846
|
@ -3358,7 +3358,9 @@ std::string hg_scanner::name(void)
|
||||||
}
|
}
|
||||||
int hg_scanner::status(void)
|
int hg_scanner::status(void)
|
||||||
{
|
{
|
||||||
if (!wait_usb_.is_waiting() || !wait_img_.is_waiting())
|
if (!online_)
|
||||||
|
return SCANNER_ERR_DEVICE_NOT_FOUND;
|
||||||
|
else if (!wait_usb_.is_waiting() || !wait_img_.is_waiting())
|
||||||
return SCANNER_ERR_DEVICE_BUSY;
|
return SCANNER_ERR_DEVICE_BUSY;
|
||||||
else
|
else
|
||||||
return status_;
|
return status_;
|
||||||
|
|
|
@ -1720,6 +1720,8 @@ SANE_Status hg_sane_middleware::set_option(SANE_Handle h, const void* option, SA
|
||||||
if (!handle || (action == SANE_ACTION_GET_VALUE && !value))
|
if (!handle || (action == SANE_ACTION_GET_VALUE && !value))
|
||||||
return SANE_STATUS_INVAL;
|
return SANE_STATUS_INVAL;
|
||||||
|
|
||||||
|
if (hg_scanner_get_status(handle, 0) == SCANNER_ERR_DEVICE_NOT_FOUND)
|
||||||
|
return local_utility::scanner_err_2_sane_statu(SCANNER_ERR_DEVICE_NOT_FOUND);
|
||||||
|
|
||||||
if (action == SANE_ACTION_GET_VALUE)
|
if (action == SANE_ACTION_GET_VALUE)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue