Jeremy White : sane.ds: Revise to match identity structures with partial information.
Alexandre Julliard
julliard at winehq.org
Thu Feb 26 09:04:58 CST 2009
Module: wine
Branch: master
Commit: 3d0d1250247e238efd6b7c28dff120be596d61d4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3d0d1250247e238efd6b7c28dff120be596d61d4
Author: Jeremy White <jwhite at codeweavers.com>
Date: Wed Feb 25 20:58:51 2009 -0600
sane.ds: Revise to match identity structures with partial information.
---
dlls/sane.ds/sane_main.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/sane.ds/sane_main.c b/dlls/sane.ds/sane_main.c
index 413649e..3bd231e 100644
--- a/dlls/sane.ds/sane_main.c
+++ b/dlls/sane.ds/sane_main.c
@@ -645,19 +645,19 @@ static TW_UINT16 SANE_OpenDS( pTW_IDENTITY pOrigin, pTW_IDENTITY self) {
/* To make string as short as above */
lstrcpynA(name, sane_devlist[i]->vendor, sizeof(name)-1);
- if (strcmp(name, self->Manufacturer))
+ if (self->Manufacturer && *self->Manufacturer && strcmp(name, self->Manufacturer))
continue;
lstrcpynA(name, sane_devlist[i]->model, sizeof(name)-1);
- if (strcmp(name, self->ProductFamily))
+ if (self->ProductFamily && *self->ProductFamily && strcmp(name, self->ProductFamily))
continue;
copy_sane_short_name(sane_devlist[i]->name, name, sizeof(name) - 1);
- if (strcmp(name, self->ProductName))
+ if (self->ProductName && *self->ProductName && strcmp(name, self->ProductName))
continue;
break;
}
if (!sane_devlist[i]) {
- FIXME("Scanner not found? Using first one!\n");
- i=0;
+ FIXME("Scanner not found.\n");
+ return TWRC_FAILURE;
}
status = psane_open(sane_devlist[i]->name,&activeDS.deviceHandle);
if (status == SANE_STATUS_GOOD) {
More information about the wine-cvs
mailing list