Previously I had changed the USB ID of this scanner from 0x0a18 back to
0x0a19, believing a previous commit to have been in error since it went
unmentioned in the commit log and duplicated the AV600U Plus scanner's USB
IDs. Rolf Würdemann reported that his AV610 scanner used the 0x0a18 ID and
that it wasn't compatible with the AV_INT_STATUS flag. This commit reverts
my USB ID changes and removes the AV_INT_STATUS flag for the AV610.
However, because this scanner shares its USB ID with the AV600U Plus, it's
possible that the AV600U Plus may require that the AV_INT_STATUS flag be set
in order to function, and thus will break with this change. The code, as
it's written, isn't designed to deal well with the possibility of shared USB
IDs, so I'll wait to see if this actually becomes a problem before embarking
on the lengthy challenge of getting that to work.
Keep track of the number of lines to flip on the reverse page using a negative
number. This uses the ill-advised principle of overloading the meaning of a
variable. Still, it kind of makes sense because these lines are upside down,
so the number should be "upside down" too. Besides, leaving it as a positive
number trips up the code which does page padding, which would require even
more special case code.
Adding sane_reload_devices() to sane_init() required sane_init() to be moved
below the sane_reload_devices() declaration. This restores the original
functionality present before I split the sane_reload_devices() code out of
sane_init() so that it could be called from sane_get_devices().
In a previous patch, I attempted to avoid the possibility of a page remaining
partially inside the ADF unit of a flipping duplex scanner after a scan.
Unfortunately, I introduced a bug where the backside page was accidentally
returned to the client in addition to being cached. This was because I had
a misunderstanding of the post-processing code. This patch skips the post-
processing section altogether, avoiding any unnecessary post-processing and
subsequent unwanted output. The other alternative here was to try to monkey
with the buffers (as is done for LINE deinterlacing), but I felt this would
be harder to implement and even harder to debug in the future.
Make install process robust against problems with setting group on the
sane lock directory. This can e.g. happen if packaging sane-backends and
building as a user other than root.