From: Ilia Docin ilya.docin@contentai.ru
--- dlls/sane.ds/options.c | 3 +++ dlls/sane.ds/unixlib.c | 1 + dlls/sane.ds/unixlib.h | 1 + 3 files changed, 5 insertions(+)
diff --git a/dlls/sane.ds/options.c b/dlls/sane.ds/options.c index 1d39844a770..eb6a308b844 100644 --- a/dlls/sane.ds/options.c +++ b/dlls/sane.ds/options.c @@ -59,6 +59,7 @@ TW_UINT16 sane_option_set_int(const char *option_name, int val, BOOL *needs_relo { struct option_descriptor opt; TW_UINT16 rc = sane_find_option(option_name, TYPE_INT, &opt); + if (!opt.is_settable) return TWCC_OPERATIONERROR;
if (rc == TWCC_SUCCESS) rc = sane_option_set_value( opt.optno, &val, needs_reload ); return rc; @@ -77,6 +78,7 @@ TW_UINT16 sane_option_set_bool(const char *option_name, int val ) { struct option_descriptor opt; TW_UINT16 rc = sane_find_option(option_name, TYPE_BOOL, &opt); + if (!opt.is_settable) return TWCC_OPERATIONERROR;
if (rc == TWCC_SUCCESS) rc = sane_option_set_value( opt.optno, &val, NULL ); return rc; @@ -102,6 +104,7 @@ TW_UINT16 sane_option_set_str(const char *option_name, char *val, BOOL *needs_re { struct option_descriptor opt; TW_UINT16 rc = sane_find_option(option_name, TYPE_STRING, &opt); + if (!opt.is_settable) return TWCC_OPERATIONERROR;
if (rc == TWCC_SUCCESS) rc = sane_option_set_value( opt.optno, val, needs_reload ); return rc; diff --git a/dlls/sane.ds/unixlib.c b/dlls/sane.ds/unixlib.c index 897aa09e5ef..69f085450a8 100644 --- a/dlls/sane.ds/unixlib.c +++ b/dlls/sane.ds/unixlib.c @@ -159,6 +159,7 @@ static void map_descr( struct option_descriptor *descr, const SANE_Option_Descri descr->constraint_type = map_constraint_type( opt->constraint_type ); descr->size = opt->size; descr->is_active = SANE_OPTION_IS_ACTIVE( opt->cap ); + descr->is_settable = SANE_OPTION_IS_SETTABLE( opt->cap ); if (opt->title) len = ntdll_umbstowcs( opt->title, strlen(opt->title), descr->title, ARRAY_SIZE(descr->title) ); descr->title[len] = 0; diff --git a/dlls/sane.ds/unixlib.h b/dlls/sane.ds/unixlib.h index d3ffbf1878d..34e7a9a9796 100644 --- a/dlls/sane.ds/unixlib.h +++ b/dlls/sane.ds/unixlib.h @@ -39,6 +39,7 @@ struct option_descriptor int optno; int size; int is_active; + int is_settable; enum { TYPE_BOOL, TYPE_INT, TYPE_FIXED, TYPE_STRING, TYPE_BUTTON, TYPE_GROUP } type; enum { UNIT_NONE, UNIT_PIXEL, UNIT_BIT, UNIT_MM, UNIT_DPI, UNIT_PERCENT, UNIT_MICROSECOND } unit; enum { CONSTRAINT_NONE, CONSTRAINT_RANGE, CONSTRAINT_WORD_LIST, CONSTRAINT_STRING_LIST } constraint_type;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146503
Your paranoid android.
=== debian11b (64 bit WoW report) ===
kernel32: comm.c:1574: Test failed: AbortWaitCts hComPortEvent failed comm.c:1586: Test failed: Unexpected time 1001, expected around 500
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000000A40104, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
This merge request was approved by Esme Povirk.