Re: sane_read returning *len == 0

David Mosberger-Tang (David.Mosberger@acm.org)
Fri, 3 Apr 1998 20:39:00 -0800

>>>>> On Fri, 3 Apr 1998 13:50:04 -0500 (EST), Matto Marjanovic <maddog@mir.com> said:

Matto> Doesn't it matter whether or not the IO mode is set to
Matto> blocking versus non-blocking? The spec states that in
Matto> blocking mode, sane_read must return at least one byte of
Matto> data for each call, blocking until it's got at least that one
Matto> byte to give (otherwise, a front-end would have to keep
Matto> polling, yuck --- non-blocking mode allows you to do a select
Matto> on the device and wake up when data arrives).

You're right---I must have been sleeping when searching for this
clause, as I couldn't find it last night... ;-/

Matto> So, if your backend is doing the simple blocking mode only,
Matto> it *should* keep reading from from scanner until it has
Matto> something to return to the frontend.

Right.

--david

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