Skip to content

Fix multi page detection when 'source' is const

Sebastian Goth requested to merge sgoth/libksane:adf-only-scanners into master

Explicitly call multi page detection once. Some scanners like EPSON DS-310 only have a single scan source which never changes.

That scanner provides a dedicated duplex option but as it is always a "ADF" source it doesn't really matter for libksane/applications. libksane has to poll for another page anyway. That might return the back side or the next page.

With this change skanpage works correctly for multiple pages with or without duplex activated. In skanlite the backside of a page is available on a second press on 'scan'.

$ scanimage -L
[...]
device `utsushi:esci:usb:/sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb2/2-4/2-4:1.0' is a EPSON DS-310 

$ scanimage -A -d utsushi:esci:usb:/sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb2/2-4/2-4:1.0
Output format is not set, using pnm as a default.

All options specific to device `utsushi:esci:usb:/sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb2/2-4/2-4:1.0':
  General:
    --source ADF [ADF] [read-only]
        Document Source
    --duplex[=(yes|no)] [no]
        Duplex
[...]
Edited by Sebastian Goth

Merge request reports