]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix option count for compatibility
authorBastian Dehn <hhaalo@arcor.de>
Sat, 15 Feb 2025 18:24:05 +0000 (19:24 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 15 Feb 2025 18:24:05 +0000 (19:24 +0100)
src/kds_s2000w_handler_opts.c

index 4db71ab80c897d8d42b7c5782afa91f5d1c1602b..2f5d578cfc89142f8b3e8ef13e903288d51c63ff 100644 (file)
@@ -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");