kopia lustrzana https://gitlab.com/sane-project/website
70 wiersze
3.2 KiB
HTML
70 wiersze
3.2 KiB
HTML
<!-- received="Sun Apr 11 14:13:51 1999 PDT" -->
|
|
<!-- sent="Sun, 11 Apr 1999 23:17:18 +0200" -->
|
|
<!-- name="Petter Reinholdtsen" -->
|
|
<!-- email="pere@hungry.com" -->
|
|
<!-- subject="Re: May sane_init fail?" -->
|
|
<!-- id="199904112117.XAA11352@lee.Cc.Uit.No" -->
|
|
<!-- inreplyto="May sane_init fail?" -->
|
|
<title>sane-devel: Re: May sane_init fail?</title>
|
|
<h1>Re: May sane_init fail?</h1>
|
|
<b>Petter Reinholdtsen</b> (<a href="mailto:pere@hungry.com"><i>pere@hungry.com</i></a>)<br>
|
|
<i>Sun, 11 Apr 1999 23:17:18 +0200</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#198">[ date ]</a><a href="index.html#198">[ thread ]</a><a href="subject.html#198">[ subject ]</a><a href="author.html#198">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0199.html">*** Gaetano Paolone ***: "Re: Mustek 1200SP/12000SP Firmware-1.05"</a>
|
|
<li> <b>Previous message:</b> <a href="0197.html">David Mosberger-Tang: "Re: May sane_init fail?"</a>
|
|
<li> <b>Maybe in reply to:</b> <a href="0166.html">Petter Reinholdtsen: "May sane_init fail?"</a>
|
|
<!-- nextthread="start" -->
|
|
<li> <b>Next in thread:</b> <a href="0391.html">Petter Reinholdtsen: "Re: May sane_init fail?"</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
[David Mosberger-Tang]<br>
|
|
<i>> That's fine, but the backend must not rely on not being called</i><br>
|
|
<i>> anymore after returning a status other than SANE_STATUS_GOOD in</i><br>
|
|
<i>> sane_init().</i><br>
|
|
<p>
|
|
Why? I would expect if sane_init() failed, the backend is in a<br>
|
|
undefined state (say it ran out of memory allocating internal buffers,<br>
|
|
and should not be used. It will require some rewriting, but I beleave<br>
|
|
it is the correct way to behave.<br>
|
|
<p>
|
|
4.3.1 (sane_init) in the documentation should be changed.<br>
|
|
<p>
|
|
"The behaviour of a SANE backend is undefined if this function is<br>
|
|
not called first."<br>
|
|
<p>
|
|
Should be changed to read something like.<br>
|
|
<p>
|
|
"The behaviour of a SANE backend is undefined if this function is<br>
|
|
not called first, or if the returned status is anything other then<br>
|
|
SANE_STATUS_GOOD."<br>
|
|
<p>
|
|
If this is not the case, all backends where sane_init may fail must be<br>
|
|
changed with a test in every method to check if sane_init was<br>
|
|
successfull.<br>
|
|
<pre>
|
|
--
|
|
##> Petter Reinholdtsen <## | <a href="mailto:pere@td.org.uit.no">pere@td.org.uit.no</a>
|
|
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
|
|
<a href="http://www.hungry.com/~pere/">http://www.hungry.com/~pere/</a> | Go Mozilla, go! Go!
|
|
<p>
|
|
<pre>
|
|
--
|
|
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
|
|
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
|
|
</pre>
|
|
<!-- body="end" -->
|
|
<p>
|
|
<ul>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0199.html">*** Gaetano Paolone ***: "Re: Mustek 1200SP/12000SP Firmware-1.05"</a>
|
|
<li> <b>Previous message:</b> <a href="0197.html">David Mosberger-Tang: "Re: May sane_init fail?"</a>
|
|
<li> <b>Maybe in reply to:</b> <a href="0166.html">Petter Reinholdtsen: "May sane_init fail?"</a>
|
|
<!-- nextthread="start" -->
|
|
<li> <b>Next in thread:</b> <a href="0391.html">Petter Reinholdtsen: "Re: May sane_init fail?"</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|