ChangeSet ID: 21321 CVSROOT: /opt/cvs-commit Module name: wine Changes by: julliard@winehq.org 2005/11/18 06:05:05
Modified files: dlls/twain : dsm_ctrl.c
Log message: Dmitry Timoshkov dmitry@codeweavers.com If SANE returns empty device list treat it as an error.
Patch: http://cvs.winehq.org/patch.py?id=21321
Old revision New revision Changes Path 1.9 1.10 +11 -3 wine/dlls/twain/dsm_ctrl.c
Index: wine/dlls/twain/dsm_ctrl.c diff -u -p wine/dlls/twain/dsm_ctrl.c:1.9 wine/dlls/twain/dsm_ctrl.c:1.10 --- wine/dlls/twain/dsm_ctrl.c:1.9 18 Nov 2005 12: 5: 5 -0000 +++ wine/dlls/twain/dsm_ctrl.c 18 Nov 2005 12: 5: 5 -0000 @@ -146,16 +146,24 @@ TW_UINT16 TWAIN_IdentityGetFirst (pTW_ID { if (device_list[0]) { + TRACE("got: %s, %s, %s\n", device_list[0]->name, device_list[0]->vendor, device_list[0]->model); pSourceIdentity->Id = DSM_sourceId ++; strcpy (pSourceIdentity->ProductName, device_list[0]->name); strcpy (pSourceIdentity->Manufacturer, device_list[0]->vendor); strcpy (pSourceIdentity->ProductFamily, device_list[0]->model); pSourceIdentity->ProtocolMajor = TWON_PROTOCOLMAJOR; pSourceIdentity->ProtocolMinor = TWON_PROTOCOLMINOR; + + DSM_currentDevice = 1; + twRC = TWRC_SUCCESS; + DSM_twCC = TWCC_SUCCESS; + } + else + { + TRACE("got empty device list\n"); + twRC = TWRC_FAILURE; + DSM_twCC = TWCC_NODS; } - DSM_currentDevice = 1; - twRC = TWRC_SUCCESS; - DSM_twCC = TWCC_SUCCESS; } else if (status == SANE_STATUS_NO_MEM) {