国产系统sane_read流程是否结束,通过读取size大小判断改为返回一次SANE_STATUS_EOF判断
This commit is contained in:
parent
d87b8c8418
commit
0ff946eab1
|
@ -1059,7 +1059,7 @@ void HGAPI HGSaneDeviceImpl::ThreadFunc(HGThread thread, HGPointer param)
|
||||||
|
|
||||||
SANE_Int readSize = 0;
|
SANE_Int readSize = 0;
|
||||||
SANE_Status stat2 = SANE_STATUS_GOOD;
|
SANE_Status stat2 = SANE_STATUS_GOOD;
|
||||||
while (readSize < bufferSize)
|
while (SANE_STATUS_EOF != stat2)
|
||||||
{
|
{
|
||||||
SANE_Int len = 0;
|
SANE_Int len = 0;
|
||||||
stat2 = saneAPI.sane_read_api(p->m_devHandle, buffer + readSize, bufferSize - readSize, &len);
|
stat2 = saneAPI.sane_read_api(p->m_devHandle, buffer + readSize, bufferSize - readSize, &len);
|
||||||
|
|
Loading…
Reference in New Issue