_kds_s2000w_handler_opts_set_options(h);
}
- if (h->current_scanner_config != NULL)
- config = json_object_object_get(h->current_scanner_config, "Configuration");
+ config = json_object_object_get(h->current_scanner_config, "Configuration");
option_descriptor* descriptor = kds_s2000w_option_descriptors_full_get_by_number(option);
- json_object* value_object = NULL;
if (strcmp(descriptor->config_name, OPTION_COUNT) == 0) {
- config = json_object_object_get(h->current_scanner_config, "Configuration");
- int32_t* int_value_ptr = (int32_t*) value;
- *int_value_ptr = kds_s2000w_option_descriptors_get_max_option_count();
+ int32_t* int_value = (int32_t*) value;
+ *int_value = kds_s2000w_option_descriptors_get_max_option_count();
return;
}
+ json_object* value_object = json_object_object_get(config, descriptor->config_name);
if (strcmp(descriptor->config_name, SCAN_SOURCE) == 0) {
- value_object = json_object_object_get(config, descriptor->config_name);
_kds_s2000w_handler_opts_write_value(value_object, descriptor->descriptor->type, value);
if (strcmp(value, "Flatbed") == 0)
return;
}
- value_object = json_object_object_get(config, descriptor->config_name);
_kds_s2000w_handler_opts_write_value(value_object, descriptor->descriptor->type, value);
}