From: Bastian Dehn Date: Sat, 27 Jan 2024 18:30:15 +0000 (+0100) Subject: add constraint for max document length X-Git-Tag: v1.0.0^2~416 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=601b11cfe88331fec74c7a5b738b108a541db5bb;p=sane-kds-s2000w-net.git add constraint for max document length --- diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index 7f62c8b..cec61fc 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -343,8 +343,11 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor( option_descriptors[option].title = "maxdocumentlength"; option_descriptors[option].desc = "maxdocumentlength"; option_descriptors[option].cap = SANE_CAP_SOFT_DETECT; - option_descriptors[option].constraint_type = SANE_CONSTRAINT_NONE; - option_descriptors[option].constraint.string_list = NULL; + option_descriptors[option].constraint_type = SANE_CONSTRAINT_STRING_LIST; + SANE_String_Const* constraint_max_document_length = malloc(sizeof(char*) * 2); + constraint_max_document_length[0] = "#NoPrimaryControl#"; + constraint_max_document_length[1] = NULL; + option_descriptors[option].constraint.string_list = constraint_max_document_length; break; case 22: option_descriptors[option].name = "scansource";