调整G300设备导出设备日志超时失败
This commit is contained in:
parent
f9b31130ac
commit
34d854cc56
|
@ -1263,21 +1263,21 @@ int hg_scanner_300::get_device_log(string &log)
|
||||||
}
|
}
|
||||||
str.resize(total);
|
str.resize(total);
|
||||||
str2.resize(total);
|
str2.resize(total);
|
||||||
ret = io_->read_bulk(&str[index], &block);
|
//ret = io_->read_bulk(&str[index], &block);//Reading too much data at once can cause error(TIME_OUT), it requires segmented reading. 2023-10-9
|
||||||
//while (ret == SCANNER_ERR_TIMEOUT) ///设备代ç <C3A7>是进行了第二æ¬?write æ<>¡ä»¶æ˜¯len > 0 如果出现问题这个地方需è¦<C3A8>打开
|
while (total)
|
||||||
//{
|
{
|
||||||
// block = 1024 * 1024;
|
block = 1024 * 1024;
|
||||||
// if (total < block)
|
if (total < block)
|
||||||
// {
|
{
|
||||||
// block = total;
|
block = total;
|
||||||
// }
|
}
|
||||||
// ret = io_->read_bulk(&str2[index], &block);
|
ret = io_->read_bulk(&str[index], &block);
|
||||||
// //if (ret != SCANNER_ERR_OK)
|
if (ret != SCANNER_ERR_OK)
|
||||||
// //return ret;
|
return ret;
|
||||||
|
|
||||||
// index += block;
|
index += block;
|
||||||
// total -= block;
|
total -= block;
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret != SCANNER_ERR_OK)
|
if (ret != SCANNER_ERR_OK)
|
||||||
|
|
Loading…
Reference in New Issue