]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix skip blank page deps
authorBastian Dehn <hhaalo@arcor.de>
Tue, 30 Jan 2024 20:04:07 +0000 (21:04 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 30 Jan 2024 20:04:07 +0000 (21:04 +0100)
src/kds_s2000w_handler.c

index 1534cc215a8541dee1b7566b41f08e4e44a7701e..e3303dc1e1328f764649c66a4fd205a45c4cccd2 100644 (file)
@@ -96,12 +96,8 @@ int _change_skip_blank_pages_off()
        json_object* value_object = json_object_object_get(config, "OutputType");
        const char* output_type = json_object_get_string(value_object);
        value_object = NULL;
-       value_object = json_object_object_get(config, "ScanSide");
-       const char* scan_side = json_object_get_string(value_object);
-       value_object = NULL;
 
-       if (strcmp(scan_side, "Duplex") == 0
-               && strcmp(output_type, "SinglePageColorPDFPlus2TIFs") == 0) {
+       if (strcmp(output_type, "SinglePageColorPDFPlus2TIFs") == 0) {
                value_object = json_object_object_get(config, "SkipBlankPages");
                json_object_set_int(value_object, 0);
                value_object = NULL;
@@ -185,6 +181,7 @@ current_state* kds_s2000w_handler_current_state()
 
 void kds_s2000w_handler_get_option(int option, void* value)
 {
+       config = json_object_object_get(resObj, "Configuration");
        json_object* value_object = NULL;
        switch(option) {
                case 0:
@@ -298,11 +295,6 @@ void kds_s2000w_handler_set_option(int option, void* value, int* info)
                        value_object = json_object_object_get(config, "ScanSide");
                        _write_string_value_to_json(value_object, value);
                        value_object = NULL;
-
-                       // BUG: change blank page off response 405 invalid settings
-                       if (_change_skip_blank_pages_off())
-                               *info = RELOAD_OPTIONS;
-
                        break;
                case 4:
                        value_object = json_object_object_get(config, "ColorMode");