]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
return no docs when all scanned
authorBastian Dehn <hhaalo@arcor.de>
Mon, 26 Feb 2024 18:50:08 +0000 (19:50 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Mon, 26 Feb 2024 18:50:08 +0000 (19:50 +0100)
src/kds_s2000w_net.c

index 9f176ca181d96396de4255a46f2c131e80407608..e5bd656a42fc4244910f49c37c3dc1999d98ebbf 100644 (file)
@@ -179,6 +179,11 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle)
                h->current_metadata->is_last = 0;
                kds_s2000w_handler_start_scan(h);
        }
+
+       if (h->current_scan_status->complete_scanned
+               && h->current_scan_status->current_image_number >= h->current_scan_status->downloaded_images)
+               return SANE_STATUS_NO_DOCS;
+
        return SANE_STATUS_GOOD;
 }