]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
scan stop flatbet and feed scan
authorBastian Dehn <hhaalo@arcor.de>
Fri, 1 Mar 2024 18:36:20 +0000 (19:36 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 1 Mar 2024 18:36:20 +0000 (19:36 +0100)
src/kds_s2000w_net.c

index ab86c8523b4df862918f8a0b75ae57661d12bb8e..3b637fa20073e6de182c69eb1985bb97aae7a910 100644 (file)
@@ -189,8 +189,15 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle)
                return SANE_STATUS_NO_DOCS;
        }
 
-       if (h->current_scan_status->complete_scanned)
+       if (h->current_scan_status->complete_scanned) {
                kds_s2000w_handler_stop_scan(h);
+               return SANE_STATUS_GOOD;
+       }
+
+       if (h->current_scan_status->available_images <= 0) {
+               kds_s2000w_handler_recreate_session(h);
+               return SANE_STATUS_GOOD;
+       }
 
        return SANE_STATUS_GOOD;
 }
@@ -214,6 +221,7 @@ SANE_Status _sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data,
                *length = 0;
                h->current_metadata->is_last = 1;
                h->read_info->readed_lines = 0;
+
                return SANE_STATUS_EOF;
        }