Re: [snapscan] Agfa 1212U problems?

From: Timothy Little (tim@lilly-villa.little-possums.net)
Date: Mon Nov 06 2000 - 14:43:21 PST

  • Next message: Henning Meier-Geinitz: "Re: detection problem"

    OK, I've found out where the backend hangs. It enters an infinite
    loop in "measure_transfer_rate". When tested with res=100, x=55, it
    tries to read 31104 bytes (in 48 lines of 648 bytes), but only ever
    gets 29808 bytes.

    It loops forever waiting to get the last 1296 bytes (two lines), which
    never arrive.

    The 31104 that it expects comes from "pss->read_bytes", which (I
    guess) should be filled with the actual number of bytes available by
    the earlier call to "scsi_read (pss, READ_TRANSTIME)".

    Anyway, changing to line

      if (status != SANE_STATUS_GOOD)

    to

      if (status != SANE_STATUS_GOOD || ndata == 0)

    fixed the problem. I suspect there should be a cleaner fix, since I
    don't really know what I am doing.

    - Tim

    --
    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 : Mon Nov 06 2000 - 14:38:00 PST