kopia lustrzana https://gitlab.com/sane-project/backends
Check if option is settable when automatically setting it. New version: 1.0.7.
Henning Meier-Geinitz <henning@meier-geinitz.de>DEVEL_2_0_BRANCH-1
rodzic
5d83665845
commit
c05ddb6092
|
@ -40,7 +40,7 @@
|
||||||
whether to permit this exception to apply to your modifications.
|
whether to permit this exception to apply to your modifications.
|
||||||
If you do not wish that, delete this exception notice. */
|
If you do not wish that, delete this exception notice. */
|
||||||
|
|
||||||
#define BUILD 6
|
#define BUILD 7
|
||||||
|
|
||||||
#include "../include/sane/config.h"
|
#include "../include/sane/config.h"
|
||||||
|
|
||||||
|
@ -613,7 +613,11 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case SANE_ACTION_SET_AUTO:
|
case SANE_ACTION_SET_AUTO:
|
||||||
|
if (!SANE_OPTION_IS_SETTABLE (sod[option].cap))
|
||||||
|
{
|
||||||
|
DBG(4, "sane_control_option: option is not settable\n");
|
||||||
|
return SANE_STATUS_INVAL;
|
||||||
|
}
|
||||||
status = sanei_constrain_value (sod + option, (void*)&v, &myinfo);
|
status = sanei_constrain_value (sod + option, (void*)&v, &myinfo);
|
||||||
if (status != SANE_STATUS_GOOD)
|
if (status != SANE_STATUS_GOOD)
|
||||||
return status;
|
return status;
|
||||||
|
@ -630,7 +634,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
||||||
case SANE_ACTION_SET_VALUE:
|
case SANE_ACTION_SET_VALUE:
|
||||||
if (!SANE_OPTION_IS_SETTABLE (sod[option].cap))
|
if (!SANE_OPTION_IS_SETTABLE (sod[option].cap))
|
||||||
{
|
{
|
||||||
DBG(4, "sane_control_option: option is not setable\n");
|
DBG(4, "sane_control_option: option is not settable\n");
|
||||||
return SANE_STATUS_INVAL;
|
return SANE_STATUS_INVAL;
|
||||||
}
|
}
|
||||||
status = sanei_constrain_value (sod + option, value, &myinfo);
|
status = sanei_constrain_value (sod + option, value, &myinfo);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
:backend "pnm"
|
:backend "pnm"
|
||||||
:version "1.0.6"
|
:version "1.0.7"
|
||||||
:status :beta
|
:status :beta
|
||||||
:manpage "sane-pnm"
|
:manpage "sane-pnm"
|
||||||
:url "mailto:henning@meier-geinitz.de"
|
:url "mailto:henning@meier-geinitz.de"
|
||||||
|
|
Ładowanie…
Reference in New Issue