sane.ds: Revise to match identity structures with partial information.
This commit is contained in:
parent
00f9ef0f4f
commit
3d0d125024
|
@ -645,19 +645,19 @@ static TW_UINT16 SANE_OpenDS( pTW_IDENTITY pOrigin, pTW_IDENTITY self) {
|
||||||
|
|
||||||
/* To make string as short as above */
|
/* To make string as short as above */
|
||||||
lstrcpynA(name, sane_devlist[i]->vendor, sizeof(name)-1);
|
lstrcpynA(name, sane_devlist[i]->vendor, sizeof(name)-1);
|
||||||
if (strcmp(name, self->Manufacturer))
|
if (self->Manufacturer && *self->Manufacturer && strcmp(name, self->Manufacturer))
|
||||||
continue;
|
continue;
|
||||||
lstrcpynA(name, sane_devlist[i]->model, sizeof(name)-1);
|
lstrcpynA(name, sane_devlist[i]->model, sizeof(name)-1);
|
||||||
if (strcmp(name, self->ProductFamily))
|
if (self->ProductFamily && *self->ProductFamily && strcmp(name, self->ProductFamily))
|
||||||
continue;
|
continue;
|
||||||
copy_sane_short_name(sane_devlist[i]->name, name, sizeof(name) - 1);
|
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;
|
continue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!sane_devlist[i]) {
|
if (!sane_devlist[i]) {
|
||||||
FIXME("Scanner not found? Using first one!\n");
|
FIXME("Scanner not found.\n");
|
||||||
i=0;
|
return TWRC_FAILURE;
|
||||||
}
|
}
|
||||||
status = psane_open(sane_devlist[i]->name,&activeDS.deviceHandle);
|
status = psane_open(sane_devlist[i]->name,&activeDS.deviceHandle);
|
||||||
if (status == SANE_STATUS_GOOD) {
|
if (status == SANE_STATUS_GOOD) {
|
||||||
|
|
Loading…
Reference in New Issue