diff --git a/ChangeLog b/ChangeLog index 6e0780bcb..066aaf5e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ image. Increased safety margin for backtracking. This fixes the "garbled image" bug. Set default gamma value to 2. Manpage update. Status set to "basic". + * frontend/scanimage.c: Don't exit with error when trying to set + inactive options. This especially happens in connection with + geometry options and the v4l backend (bugs #300321, #301977). 2005-08-13 Henning Meier-Geinitz diff --git a/frontend/scanimage.c b/frontend/scanimage.c index 9dbe055a1..920a489b4 100644 --- a/frontend/scanimage.c +++ b/frontend/scanimage.c @@ -929,7 +929,14 @@ set_option (SANE_Handle device, int optnum, void *valuep) SANE_Int info; opt = sane_get_option_descriptor (device, optnum); - + if (opt && (!SANE_OPTION_IS_ACTIVE (opt->cap))) + { + if (verbose > 0) + fprintf (stderr, "%s: ignored request to set inactive option %s\n", + prog_name, opt->name); + return; + } + if (opt->size == sizeof (SANE_Word) && opt->type != SANE_TYPE_STRING) orig = *(SANE_Word *) valuep;