From: Bastian Dehn Date: Sat, 3 Feb 2024 11:18:07 +0000 (+0100) Subject: write one byte by read X-Git-Tag: v1.0.0^2~365 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=aaa213ed78a0593db34c5f706ec3c6dd98ac95cf;p=sane-kds-s2000w-net.git write one byte by read --- diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index dabebc2..d3f4c27 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -152,7 +152,6 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor( SANE_Status _sane_kds_s2000w_net_control_option(SANE_Handle handle, SANE_Int option, SANE_Action action, void* value, SANE_Int* info) { - if (action == SANE_ACTION_GET_VALUE) kds_s2000w_handler_get_option(option, value); @@ -170,10 +169,10 @@ SANE_Status _sane_kds_s2000w_net_get_parameters(SANE_Handle handle, { params->format = SANE_FRAME_GRAY; params->last_frame = SANE_TRUE; - params->bytes_per_line = 0; - params->pixels_per_line = 0; - params->lines = 0; - params->depth = 0; + params->bytes_per_line = 1024; + params->pixels_per_line = 1; + params->lines = 1; + params->depth = 1; return SANE_STATUS_GOOD; } @@ -186,6 +185,9 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle) SANE_Status _sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data, SANE_Int max_length, SANE_Int* length) { + *data = 1; + *length = 1; + return SANE_STATUS_GOOD; }