From 601b11cfe88331fec74c7a5b738b108a541db5bb Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 27 Jan 2024 19:30:15 +0100 Subject: [PATCH] add constraint for max document length --- src/kds_s2000w_net.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"; -- 2.39.5