From: Bastian Dehn Date: Sat, 15 Feb 2025 18:24:05 +0000 (+0100) Subject: fix option count for compatibility X-Git-Tag: v1.0.36^2~1 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=c1f564ce0d3739a71d098d9896355a8cba650f98;p=sane-kds-s2000w-net.git fix option count for compatibility --- diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index 4db71ab..2f5d578 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -5,6 +5,7 @@ #include "kds_s2000w_debug.h" #define AUTOSTART_ON 1 +#define OPTION_COUNT 22 void _kds_s2000w_handler_opts_write_string_value(json_object* value_object, void* value) { @@ -112,8 +113,7 @@ void kds_s2000w_handler_opts_get_option(handler* h, uint32_t option, void* value case 0: config = json_object_object_get(h->current_scanner_config, "Configuration"); int32_t* int_value_ptr = (int32_t*) value; - *int_value_ptr = json_object_object_length(config); - kds_s2000w_debug_printf_int(DEBUG, "option numbers", *int_value_ptr); + *int_value_ptr = OPTION_COUNT; break; case 2: value_object = json_object_object_get(config, "ScanSource");