[snapscan] More USB updates

From: cbagwell@sprynet.com
Date: Sun Nov 19 2000 - 17:16:19 PST

  • Next message: Steve Underwood: "Re: [snapscan] More USB updates"

    I've committed to snapscan's CVS server a few changes needed to get
    USB working on my Acer 640BU scanner. There are only two changes.
    The first is so that usb read()'s will retry if it ever returns
    EAGAIN.

    The second is a fix for the problem as first described by
    Lawrence Glaister. There is a case upon initial startup of
    the scan that RGBRouter_remaining() could return a negative value
    which would in turn cause the rest of the code to go into an
    infinite loop. This seems to only happen for me at 600 dpi
    but it seems like it should happen in all cases.

    Would a few people please code review my changes to snapscan_sources.c:RGBRouter_remaining() and verify the bad effects
    that could happen if cb_start == -1. The main thing that was
    happening was that it caused the code to subtract cb_size from
    the current remaining buffer length. Since your never going to
    have more data then the cb_size, it was always negative.

    Perhaps I'm missing what the original purpose of that code was
    meant to do.

    Now that I got this done, I'll attempt to get the code compiling
    on OS/2 boxes by forcing it to use stub functions on unsupported
    platforms.

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Sun Nov 19 2000 - 17:02:44 PST