[Wine-patches] [eterhack] services: Fix problem with usbhub waiting.
Alexander Morozov
amorozov на etersoft.ru
Ср Июл 1 18:10:49 MSD 2009
Eterbug #3845
----------- следующая часть -----------
From f839642688ea6bcf9caaba96443636cebecad748 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 1 Jul 2009 17:59:20 +0400
Subject: [eterhack] services: Fix problem with usbhub waiting.
---
programs/services/services.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/programs/services/services.c b/programs/services/services.c
index 88c1de4..013c000 100644
--- a/programs/services/services.c
+++ b/programs/services/services.c
@@ -267,17 +267,23 @@ static void scmdatabase_autostart_services(struct scmdatabase *db)
size = i;
for (i = 0; i < size; i++)
{
+#ifdef HAVE_LIBUSB
+ HANDLE event = NULL;
+#endif
DWORD err;
const WCHAR *argv[2];
service = services_list[i];
argv[0] = service->name;
argv[1] = NULL;
+#ifdef HAVE_LIBUSB
+ if (!strcmpW(service->name, usbhub))
+ event = CreateEventW(NULL, TRUE, FALSE, usbhub_started_event);
+#endif
err = service_start(service, 1, argv);
/* FIXME: do something if the service failed to start */
#ifdef HAVE_LIBUSB
- if (!strcmpW(service->name, usbhub))
+ if (event)
{
- HANDLE event = CreateEventW(NULL, TRUE, FALSE, usbhub_started_event);
WaitForSingleObject(event, 30000);
CloseHandle(event);
}
--
1.6.3.3
Подробная информация о списке рассылки Wine-patches