epson2: fixed network issue

merge-requests/1/head
Alessandro Zummo 2009-06-17 17:36:49 +02:00
rodzic 852df2e844
commit 2d89885211
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -907,7 +907,7 @@ sane_get_devices(const SANE_Device ***device_list, SANE_Bool __sane_unused__ loc
DBG(5, "%s - results:\n", __func__);
for (i = 0, dev = first_dev; i < num_devices; dev = dev->next, i++) {
for (i = 0, dev = first_dev; i < num_devices && dev; dev = dev->next, i++) {
DBG(1, " %d (%d): %s\n", i, dev->connection, dev->model);
devlist[i] = &dev->sane;
}

Wyświetl plik

@ -115,11 +115,12 @@ sanei_epson_net_read(Epson_Scanner *s, unsigned char *buf, size_t wanted,
return 0;
}
} else if (wanted < size && s->netlen == size) {
/* } else if (wanted < size && s->netlen == size) { */
} else {
DBG(23, "%s: partial read\n", __func__);
read = sanei_tcp_read(s->fd, s->netbuf, size);
if (read < 0) {
if (read != size) {
*status = SANE_STATUS_IO_ERROR;
return 0;
}