Jeremy White : twain_32: Set the correct condition code for DG_CONTROL/ DAT_IDENTITY/MSG_GETDEFAULT.
Alexandre Julliard
julliard at winehq.org
Thu Jan 29 09:15:38 CST 2009
Module: wine
Branch: master
Commit: 768c06d3e57344c427bf787285517ea74b438baa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=768c06d3e57344c427bf787285517ea74b438baa
Author: Jeremy White <jwhite at winehq.org>
Date: Wed Jan 28 08:53:05 2009 -0600
twain_32: Set the correct condition code for DG_CONTROL/DAT_IDENTITY/MSG_GETDEFAULT.
---
dlls/twain_32/dsm_ctrl.c | 1 +
dlls/twain_32/tests/dsm.c | 12 +++---------
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/twain_32/dsm_ctrl.c b/dlls/twain_32/dsm_ctrl.c
index 346aad3..16bffc3 100644
--- a/dlls/twain_32/dsm_ctrl.c
+++ b/dlls/twain_32/dsm_ctrl.c
@@ -156,6 +156,7 @@ TW_UINT16 TWAIN_IdentityGetDefault (pTW_IDENTITY pOrigin, TW_MEMREF pData)
if (!nrdevices)
return TWRC_FAILURE;
*pSourceIdentity = devices[0].identity;
+ DSM_twCC = TWCC_SUCCESS;
return TWRC_SUCCESS;
}
diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c
index 7ac3739..8f3c7bf 100644
--- a/dlls/twain_32/tests/dsm.c
+++ b/dlls/twain_32/tests/dsm.c
@@ -174,15 +174,9 @@ static void test_sources(TW_IDENTITY *appid)
memset(&source, 0, sizeof(source));
rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETDEFAULT, &source);
get_condition_code(appid, NULL, &status);
- ok(rc == TWRC_SUCCESS || rc == TWRC_FAILURE, "Get default error code, rc %d, cc %d\n", rc, status.ConditionCode);
- if (rc == TWRC_SUCCESS)
- {
- todo_wine
- ok(status.ConditionCode == TWCC_SUCCESS,"Get default invalid condition code, rc %d, cc %d\n", rc, status.ConditionCode);
- }
-
- if (rc == TWRC_FAILURE)
- ok(status.ConditionCode == TWCC_NODS,"Get default invalid condition code, rc %d, cc %d\n", rc, status.ConditionCode);
+ ok( (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS) ||
+ (rc == TWRC_FAILURE && status.ConditionCode == TWCC_NODS),
+ "Get default invalid condition code, rc %d, cc %d\n", rc, status.ConditionCode);
if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS)
{
More information about the wine-cvs
mailing list