(cc: to Oliver because of possible xsane problem mentioned below) Hi,
On Wed, Mar 20, 2002 at 11:01:57AM +0100, mh wrote: > While you're working on the net backend, could you please take a look at the > following problem ? It was introduced by a patch to solve the endianness > problems, which I send to the list last year and which you applied, after no > one complaint. > > This code will blow up, if e.g. a frontend requests only one byte or if > calling read() (in sane_read()) results in nread == 1. > In this case, the frontend/net backend will hang forever. > > If you don't have a better solution already, please review the attached > patch. Thanks. I have just committed the patch to CVS. I removed the debug stuff and adjusted indenting a little. I couldn't test with xsane because it doesn't seem to like 1-bit transfers with 16 bit per color data. I hope this is not a backend bug :-/ I just added "max_len=1" to the sane_read function of a backend (mustek.c). The scanner starts and xsane gets an image but it is completely empty (0 lines, 0 bytes). If I set max_len to 2 (or bigger) it works. Testing with scanimage works. Bye, Henning