From: Bastian Dehn Date: Thu, 22 Feb 2024 19:10:12 +0000 (+0100) Subject: change available image subtraction X-Git-Tag: v1.0.0^2~219 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=cef5f4d587761fa15a99835c183a3ac1fef37769;p=sane-kds-s2000w-net.git change available image subtraction --- diff --git a/src/kds_s2000w_handler.c b/src/kds_s2000w_handler.c index 7418619..b12e806 100644 --- a/src/kds_s2000w_handler.c +++ b/src/kds_s2000w_handler.c @@ -106,6 +106,7 @@ void _delete_current_image(handler* h) kds_s2000w_client_delete_image(h->sessionid, h->current_scan_status->current_image_number, resp); kds_s2000w_client_response_free(resp); resp = NULL; + h->current_scan_status->available_images--; sleep(1); } @@ -288,23 +289,18 @@ void kds_s2000w_handler_get_parameters(void* handle) debug_printf(ALL, "kds_s2000w_handler_get_parameters"); handler* h = (handler*) handle; if (!h->current_scan_status->complete_scanned - && h->current_scan_status->downloaded_images == h->current_scan_status->available_images) { + && h->current_scan_status->available_images <= 0) { _get_current_scan_status(h); } if (h->current_scan_status->complete_scanned - && h->current_scan_status->downloaded_images == h->current_scan_status->available_images) { + & h->current_scan_status->available_images <= 0) { h->current_metadata->valid = 1; h->current_metadata->scanned_all_complete = 1; h->current_metadata->is_last = 1; return; } - if (h->current_scan_status->downloaded_images >= h->current_scan_status->available_images) { - h->current_metadata->valid = 0; - return; - } - _download_current_image(h); _get_current_metadata(h); _delete_current_image(h);