# Re: May sane_init fail?

Petter Reinholdtsen (pere@hungry.com)
Sun, 11 Apr 1999 22:44:52 +0200

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: David Mosberger-Tang: "Re: sane-pre1.01 problems with dc210"
- Previous message: Ruggero Valetti: "Scanner list update"
- Maybe in reply to: Petter Reinholdtsen: "May sane_init fail?"
- Next in thread: David Mosberger-Tang: "Re: May sane_init fail?"
- Reply: David Mosberger-Tang: "Re: May sane_init fail?"

[David Mosberger-Tang]
> Hmmh, this may well be a typo. I'm quite sure our intention was
> that a frontend does not have to check for the return value of
> sane_init() (i.e., treat it as a void). Note that none of the
> existing frontends check the return status of sane_init(). I think
> we should correct this in v2 of the SANE protocol.

The dll backend is checking for status != SANE_STATUS_GOOD before
accepting the backend. I'm not sure if any backends actually is using
this, but I beleave there should be a way for the backend to say
"don't use me", and that sane_init therefore should return
SANE_Status.

I suggest SANE_STATUS_GOOD if all is OK, and SANE_STATUS_UNSUPPORTED
if the backend beleave itself to be useless. The last case will be
the case for the net backend on Windows if the WINSOCK.DLL is missing
or has the wrong version. It should be the same with SCSI drivers on
machines with no SCSI card.

    --
    ##>  Petter Reinholdtsen <##    | pere@td.org.uit.no
     O-  <SCRIPT Language="Javascript">window.close()</SCRIPT>
    http://www.hungry.com/~pere/    | Go Mozilla, go! Go!

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

     Next message: David Mosberger-Tang: "Re: sane-pre1.01 problems with dc210"
     Previous message: Ruggero Valetti: "Scanner list update"
     Maybe in reply to: Petter Reinholdtsen: "May sane_init fail?"

     Next in thread: David Mosberger-Tang: "Re: May sane_init fail?"
     Reply: David Mosberger-Tang: "Re: May sane_init fail?"