[Wine-devel] [try 2] wineusbhub: initialize usb_busses only when attaching to process
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Чт Июн 19 15:28:25 MSD 2008
----------- следующая часть -----------
From 2f99c0d8ea4521b6a6cffa77c63e1efc3180b7d7 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на builder.office.etersoft.ru>
Date: Thu, 19 Jun 2008 15:24:42 +0400
Subject: [PATCH] wineusbhub: initialize usb_busses only when attaching to process
---
dlls/wineusbhub/wineusbhub.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/wineusbhub/wineusbhub.c b/dlls/wineusbhub/wineusbhub.c
index 72ac123..0f3afb0 100644
--- a/dlls/wineusbhub/wineusbhub.c
+++ b/dlls/wineusbhub/wineusbhub.c
@@ -334,9 +334,12 @@ DEVICE_OBJECT *__wine_usbhub_get_pdo( UCHAR *pdo_info )
BOOL WINAPI DllMain( HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv )
{
#ifdef HAVE_USB_H
- usb_init();
- usb_find_busses();
- usb_find_devices();
+ if (fdwReason == DLL_PROCESS_ATTACH)
+ {
+ usb_init();
+ usb_find_busses();
+ usb_find_devices();
+ }
#endif
return TRUE;
}
--
1.5.4.5.GIT
Подробная информация о списке рассылки Wine-devel