From 6886cf6e8015e5e7c452add4907d7a486ee8ccb1 Mon Sep 17 00:00:00 2001 From: Ralph Little Date: Sat, 3 Oct 2020 10:38:50 -0700 Subject: [PATCH] gt68xx: Added temporary fix to avoid stop scan during cancel. Calling this function upsets some scanners in this family. This temporary sticking plaster permits the Mustek 1248UB scanner to scan after cancelling. We need to look into this much more when a scanner becomes available for investigation. --- backend/gt68xx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/gt68xx.c b/backend/gt68xx.c index da3996053..1ad0dd2cf 100644 --- a/backend/gt68xx.c +++ b/backend/gt68xx.c @@ -2329,7 +2329,14 @@ sane_cancel (SANE_Handle handle) /* some scanners don't like this command when cancelling a scan */ sanei_usb_set_timeout (SHORT_TIMEOUT); gt68xx_device_fix_descriptor (s->dev); - gt68xx_scanner_stop_scan (s); + + // FIXME: Temporary sticking plaster fix for models that cannot scan after calling this + // function to cancel. [RL] + if (s->dev->model->command_set != &mustek_gt6816_command_set) + { + gt68xx_scanner_stop_scan (s); + } + sanei_usb_set_timeout (LONG_TIMEOUT); if (s->dev->model->flags & GT68XX_FLAG_SHEET_FED)