control失败后不再重试
This commit is contained in:
parent
b90921142a
commit
70c11622ff
|
@ -844,21 +844,21 @@ int usb_io::control_io(uint8_t type, uint8_t req, uint16_t val, uint16_t ind, vo
|
|||
}
|
||||
else
|
||||
{
|
||||
if (on_io_error((scanner_err)usb_manager::usb_error_2_hg_err(ret), &endpoints_.control.in))
|
||||
{
|
||||
ret = libusb_control_transfer(handle_, type, req, val, ind, (unsigned char*)buf, *len, to_);
|
||||
if (ret > 0)
|
||||
{
|
||||
*len = ret;
|
||||
//if (on_io_error((scanner_err)usb_manager::usb_error_2_hg_err(ret), &endpoints_.control.in))
|
||||
//{
|
||||
// ret = libusb_control_transfer(handle_, type, req, val, ind, (unsigned char*)buf, *len, to_);
|
||||
// if (ret > 0)
|
||||
// {
|
||||
// *len = ret;
|
||||
|
||||
last_err_ = SCANNER_ERR_OK;
|
||||
// last_err_ = SCANNER_ERR_OK;
|
||||
|
||||
return last_err_;
|
||||
}
|
||||
else
|
||||
*len = 0;
|
||||
}
|
||||
else
|
||||
// return last_err_;
|
||||
// }
|
||||
// else
|
||||
// *len = 0;
|
||||
//}
|
||||
//else
|
||||
*len = 0;
|
||||
VLOG_MINI_5(LOG_LEVEL_DEBUG_INFO, "libusb_control_transfer(%x, %x, %d, %d) = %s\n", type, req, val, ind, libusb_error_name(ret));
|
||||
last_err_ = usb_manager::usb_error_2_hg_err(ret);
|
||||
|
|
Loading…
Reference in New Issue