kopia lustrzana https://gitlab.com/sane-project/backends
Set USB configuration only if different from the current one
This follows up on earlier USB3 fixes. It only addresses libusb-1.0 because there is no convenience API for libusb-0.1 to get the current configuration.merge-requests/1/head
rodzic
5283a8792e
commit
365b619dfe
|
@ -1673,8 +1673,10 @@ sanei_usb_open (SANE_String_Const devname, SANE_Int * dn)
|
|||
desc.bNumConfigurations,
|
||||
config0->bConfigurationValue);
|
||||
|
||||
result = libusb_set_configuration (devices[devcount].lu_handle,
|
||||
config0->bConfigurationValue);
|
||||
result = 0;
|
||||
if (config != config0->bConfigurationValue)
|
||||
result = libusb_set_configuration (devices[devcount].lu_handle,
|
||||
config0->bConfigurationValue);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue