[sane-devel] scanimage does not recognize basic long options
Ralph Little
skelband at gmail.com
Sat Feb 4 17:06:41 GMT 2023
Hi,
On 2023-02-04 01:15, Karl Weber wrote:
> Hi,
>
> On Friday, 3 February 2023 21:11:11 CET Karl Weber wrote:
>> It is easy, to fix this. After
>>
>> if (opt->type == SANE_TYPE_GROUP)
>> continue;
>>
>> one may to add
>>
>> if (opt->name == NULL)
>> continue;
> The sources that come with my distribution, i.e. version 1.0.32, have the
> different check in fetch_options:
>
> /* create command line option only for settable options */
> if (!SANE_OPTION_IS_SETTABLE (opt->cap) || opt->type == SANE_TYPE_GROUP)
> continue;
>
> The condition on SANE_OPTION_IS_SETTABLE(opt->cap) has been removed in version
> 1.1.1 and this causes the problem.
I'm a bit confused by this comment. I thought that your issue was caused
by the backend sending NULL.
Which problem do you believe this causes? Or are you saying that the
NULL options issue is revealed by this change? That is certainly possible.
That specific change was introduced to avoid readonly options being
reported as "invalid" which is confusing to the user, as they are
obviously valid, yet cannot be set.
It now reports that the option is readonly.
Cheers,
Ralph
More information about the sane-devel
mailing list