From 6a518d64ed195260f04999a782d687cdd7d2c52c Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 14 Apr 2024 09:09:49 +0200 Subject: [PATCH] fix set option without get option --- src/kds_s2000w_handler_opts.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.5