diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-02-07 06:56:10 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-02-07 06:56:10 +0100 |
commit | 43f33c72804e63306580755049c09d5a81ad83e3 (patch) | |
tree | 805caeb00a832ed96a331907987d4e6a2056a391 /backend/pieusb.c | |
parent | 0f86c5490ea7c2218a4394bf4c21bf3f9267a47c (diff) | |
parent | 6427d36e269d8c14e6bc55373102a4ebc971ca38 (diff) |
Merge branch 'release/debian/1.1.1-1'debian/1.1.1-1
Diffstat (limited to 'backend/pieusb.c')
-rw-r--r-- | backend/pieusb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/backend/pieusb.c b/backend/pieusb.c index a070fc0..f8dc073 100644 --- a/backend/pieusb.c +++ b/backend/pieusb.c @@ -110,6 +110,8 @@ extern void write_tiff_rgbi_header (FILE *fptr, int width, int height, int depth /* device flags */ #define FLAG_SLIDE_TRANSPORT 0x01 +/* Some scanners do understand SLIDE_TRANSPORT but not CMD_17 - introducing a new flag */ +#define FLAG_CMD_17_NOSUPPORT 0x02 /* -------------------------------------------------------------------------- * @@ -163,7 +165,6 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize DBG (DBG_info_sane, "sane_init() build %d\n", BUILD); /* Set version code to current major, minor and build number */ - /* TODO: use V_MINOR instead or SANE_CURRENT_MINOR? If so, why? */ if (version_code) *version_code = SANE_VERSION_CODE (SANE_CURRENT_MAJOR, SANE_CURRENT_MINOR, BUILD); @@ -1004,10 +1005,12 @@ sane_start (SANE_Handle handle) /* ---------------------------------------------------------------------- * * Function 17 + * This function is not supported by all scanners which are capable of + * slide transport, therefore FLAG_CMD_17_NOSUPPORT was introduced. * * ---------------------------------------------------------------------- */ - if (scanner->device->flags & FLAG_SLIDE_TRANSPORT) { + if ( (scanner->device->flags & FLAG_SLIDE_TRANSPORT) & !(scanner->device->flags & FLAG_CMD_17_NOSUPPORT) ) { sanei_pieusb_cmd_17 (scanner->device_number, 1, &status); if (status.pieusb_status != PIEUSB_STATUS_GOOD) { DBG (DBG_error, "sane_start(): sanei_pieusb_cmd_17 failed: %d\n", status.pieusb_status); |