[Wine-patches] [eterhack 05/23] usbhub.sys: Add support for setting device into its unconfigured state.

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Пт Июн 5 13:00:05 MSD 2009


---
 dlls/usbhub.sys/usbhub.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/usbhub.sys/usbhub.c b/dlls/usbhub.sys/usbhub.c
index 2a1f00e..277cd4f 100644
--- a/dlls/usbhub.sys/usbhub.c
+++ b/dlls/usbhub.sys/usbhub.c
@@ -119,8 +119,8 @@ static NTSTATUS WINAPI usbhub_internal_ioctl( DEVICE_OBJECT *device, IRP *irp )
                 {
                     int ret;
 
-                    ret = libusb_set_configuration( husb,
-                            conf_desc->bConfigurationValue );
+                    ret = libusb_set_configuration( husb, (conf_desc != NULL) ?
+                            conf_desc->bConfigurationValue : -1 );
                     if (ret < 0)
                         ERR( "libusb_set_configuration: %d\n", ret );
                     else
@@ -356,8 +356,8 @@ static NTSTATUS WINAPI usbhub_internal_ioctl( DEVICE_OBJECT *device, IRP *irp )
                 {
                     int ret;
 
-                    ret = usb_set_configuration( husb,
-                            conf_desc->bConfigurationValue );
+                    ret = usb_set_configuration( husb, (conf_desc != NULL) ?
+                            conf_desc->bConfigurationValue : -1 );
                     if (ret < 0)
                         ERR( "%s\n", usb_strerror() );
                     else
-- 
1.6.3.1



Подробная информация о списке рассылки Wine-patches