From: Bastian Dehn Date: Tue, 27 Feb 2024 16:51:12 +0000 (+0100) Subject: read faster images X-Git-Tag: v1.0.0^2~167 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=78a829fd7c8d46cdc973c4c049b48f5a128f58cf;p=sane-kds-s2000w-net.git read faster images --- diff --git a/src/kds_s2000w_handler.c b/src/kds_s2000w_handler.c index 98110a3..842c0d7 100644 --- a/src/kds_s2000w_handler.c +++ b/src/kds_s2000w_handler.c @@ -111,7 +111,6 @@ void _delete_current_image(handler* h) kds_s2000w_client_response_free(resp); resp = NULL; h->current_scan_status->available_images--; - sleep(1); } void _download_current_image(handler* h) @@ -133,7 +132,6 @@ void _download_current_image(handler* h) kds_s2000w_client_response_free(resp); resp = NULL; h->current_scan_status->downloaded_images++; - sleep(1); } void _get_current_scan_status(handler* h) @@ -162,7 +160,6 @@ void _get_current_scan_status(handler* h) status_resp_obj = NULL; kds_s2000w_client_response_free(resp); resp = NULL; - sleep(1); } handler* init_handler() diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index 10f96b4..bf159d5 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -174,14 +174,14 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle) } for (int i = 0; i < 10; i++) { - sleep(1); kds_s2000w_handler_get_parameters(h); if (h->current_metadata->valid) break; } if (h->current_scan_status->complete_scanned - && h->current_scan_status->current_image_number >= h->current_scan_status->downloaded_images) + && h->current_scan_status->current_image_number >= h->current_scan_status->downloaded_images + && h->current_scan_status->available_images <= 0) return SANE_STATUS_NO_DOCS; return SANE_STATUS_GOOD;