[Wine-patches] [eter-1.0.10 2/2] services: Fix problem with usbhub waiting.

Alexander Morozov amorozov на etersoft.ru
Ср Июл 1 18:09:17 MSD 2009


----------- следующая часть -----------
From ae5b3a3b6bc2b656c8102bdc801f02d58264c255 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 1 Jul 2009 17:59:20 +0400
Subject: [eter-1.0.10 2/2] 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 4c2e04b..085b517 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