kds_s2000w_handler_start_scan(h);
}
- for (int i = 0; i < 10; i++) {
+ for (int i = 0; i < 100; i++) {
+ usleep(100000);
kds_s2000w_handler_get_parameters(h);
if (h->current_metadata->valid)
break;
}
+ if (h->current_scan_status->complete_scanned)
+ kds_s2000w_handler_stop_scan(h);
+
if (h->current_scan_status->complete_scanned
&& h->current_scan_status->current_image_number >= h->current_scan_status->downloaded_images
- && h->current_scan_status->available_images <= 0)
+ && h->current_scan_status->available_images <= 0) {
return SANE_STATUS_NO_DOCS;
+ }
return SANE_STATUS_GOOD;
}