From: Bastian Dehn Date: Sun, 14 Apr 2024 07:09:49 +0000 (+0200) Subject: fix set option without get option X-Git-Tag: v1.0.0^2~13 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=6a518d64ed195260f04999a782d687cdd7d2c52c;p=sane-kds-s2000w-net.git fix set option without get option --- diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index fed2826..5ca9b57 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -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;