]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix set option without get option
authorBastian Dehn <hhaalo@arcor.de>
Sun, 14 Apr 2024 07:09:49 +0000 (09:09 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 14 Apr 2024 07:09:49 +0000 (09:09 +0200)
src/kds_s2000w_handler_opts.c

index fed2826b855b3e35e2298a0c6716c470aee5c99a..5ca9b5704d350f9496eeb3e7d396a9d679b2747c 100644 (file)
@@ -176,6 +176,11 @@ void kds_s2000w_handler_set_option(handler* h, int option, void* value, int* inf
        json_object* default_config = NULL;
        json_object* config = NULL;
 
+       if (h->current_scan_status->load_options == 0 && option > 0) {
+               h->current_scan_status->load_options = 1;
+               _load_options(h);
+       }
+
        config = json_object_object_get(h->current_scanner_config, "Configuration");
 
        int autostart_value = AUTOSTART_ALWAYS_ON;