[Wine-devel] wineusbhub: initialize usb_busses only when attaching to process
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Чт Июн 19 15:00:55 MSD 2008
----------- следующая часть -----------
From 78a5138040080906a6dcd55b865ec871e75c8c1e Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на builder.office.etersoft.ru>
Date: Thu, 19 Jun 2008 14:26:07 +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 a5af95a..bc12e4e 100644
--- a/dlls/wineusbhub/wineusbhub.c
+++ b/dlls/wineusbhub/wineusbhub.c
@@ -326,9 +326,12 @@ DEVICE_OBJECT *__wine_usbhub_get_pdo( UCHAR *pdo_info )
BOOL WINAPI DllMain( HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv )
{
- usb_init();
- usb_find_busses();
- usb_find_devices();
+ if (fdwReason == DLL_PROCESS_ATTACH)
+ {
+ usb_init();
+ usb_find_busses();
+ usb_find_devices();
+ }
return TRUE;
}
--
1.5.4.5.GIT
Подробная информация о списке рассылки Wine-devel