Logic correction.

merge-requests/463/merge
Thierry HUCHARD 2020-05-10 01:28:49 +02:00
rodzic c1d302f3d7
commit 64c1c8a865
2 zmienionych plików z 16 dodań i 13 usunięć

Wyświetl plik

@ -1148,13 +1148,20 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *len)
free(handler->scanner->img_data);
handler->scanner->img_data = NULL;
if (handler->scanner->source != PLATEN) {
SANE_Bool next_page = SANE_FALSE;
SANE_Status st = escl_status(handler->device,
handler->scanner->source);
DBG(10, "eSCL : command returned status %s\n", sane_strstatus(st));
SANE_Bool next_page =
(SANE_STATUS_GOOD == st ?
SANE_TRUE :
SANE_FALSE);
// Thank's Alexander Pevzner (pzz@apevzner.com)
switch (status) {
case SANE_STATUS_GOOD:
case SANE_STATUS_UNSUPPORTED:
case SANE_STATUS_DEVICE_BUSY:
DBG(10, "eSCL : next page\n");
next_page = SANE_TRUE;
default:
break;
}
handler->scanner->work = next_page;
handler->ps.last_frame = !next_page;
if (handler->ps.last_frame == SANE_TRUE)

Wyświetl plik

@ -187,11 +187,7 @@ escl_status(const ESCL_Device *device, int source)
/* Decode Job status */
// Thank's Alexander Pevzner (pzz@apevzner.com)
print_xml_platen_and_adf_status(node, &platen, &adf);
if (platen == SANE_STATUS_DEVICE_BUSY &&
(adf == SANE_STATUS_NO_DOCS ||
adf == SANE_STATUS_GOOD)) {
status = SANE_STATUS_GOOD;
} else if (platen != SANE_STATUS_GOOD &&
if (platen != SANE_STATUS_GOOD &&
platen != SANE_STATUS_UNSUPPORTED) {
status = platen;
} else if (source == PLATEN) {