[sane-devel] saned issues for remote scanner access

Jim George jim.george at blueyonder.co.uk
Mon Feb 23 18:57:16 GMT 2004


Hi Henning,

> Hi,
>
> On Sun, Feb 22, 2004 at 09:30:47PM +0100, Julien BLACHE wrote:
>> "Jim George" <jim.george at blueyonder.co.uk> wrote:
>>
>> > [saned] process_request: waiting for request
>> > [saned] process_request: got request 8
>> > [saned] decode_handle: w->status: 0, h: 0, num_handles: 0
>> > [saned] decode_handle: cancel: error while decoding handle argument
>> (h=0, Success)
>>
>> Ok, now that is interesting. How can num_handles fall to 0, although
>> there was a successful sane_open() before that ?
>
> Error because assumption is wrong (I think) :-)
>
> Let's have a look at the original log again:
>
> [saned] process_request: got request 2
> [saned] process_request: (open) strlen(resource) == 0
> [gt68xx] sane_get_devices: start: local_only = true
> [gt68xx] sane_get_devices: exit
> [saned] process_request: access to resource gt68xx' granted
> [saned] process_request: waiting for request
>
> There is something wrong here. After "access to resource `gt68xx'
> granted" there should be a log entry from the gt68xx backend.
> Something like:
>
> [gt68xx] sane_open: start (devicename = libusb:001:004')
> [gt68xx] sane_open: found mustek-bearpaw-1200-cu' in devlist
> [gt68xx] gt68xx_device_open: enter: dev=0x80812e8
> [...]
>
> So sane_open() wasn't ever called in the gt68xx backend. I even think
> that sane_open() returned with an error (from the dll backend, because
> no backend reported any scanner).
>
> So this code returns SANE_STATUS_INVALID:
>
>        reply.status = sane_open (name, &be_handle);
>
> And therefore get_handle is never called.
>
> So it looks like an error of the frontend/client to call
> SANE_NET_CANCEL with an invalid handle.
>
> saned shouldn't crash anyway.
>
> I think the scanner was just not detected on the server by saned for
> some reason (permission problem?).

Why would I be able to access the device happily through saned on the same
server, but not be able to access the same device through the same
instance of saned but the client is on another machine?

Jim







More information about the sane-devel mailing list