[Wine-patches] [eter-1.0.10 1/2] services: Do not wait for usbhub if there is not USB support.

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


Eterbug #3845
----------- следующая часть -----------
From ec2a96a16e593dddca552fe4b40cd64cb874f268 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Thu, 30 Apr 2009 16:59:39 +0400
Subject: [eter-1.0.10 1/2] services: Do not wait for usbhub if there is not USB support.

---
 programs/services/services.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/programs/services/services.c b/programs/services/services.c
index a15a105..4c2e04b 100644
--- a/programs/services/services.c
+++ b/programs/services/services.c
@@ -20,6 +20,8 @@
 
 #define WIN32_LEAN_AND_MEAN
 
+#include "config.h"
+
 #include <stdarg.h>
 #include <windows.h>
 #include <winsvc.h>
@@ -223,9 +225,11 @@ DWORD scmdatabase_remove_service(struct scmdatabase *db, struct service_entry *s
 
 static void scmdatabase_autostart_services(struct scmdatabase *db)
 {
+#ifdef HAVE_LIBUSB
     static const WCHAR usbhub_started_event[] = {'_','_','w','i','n','e',
         '_','U','s','b','h','u','b','S','t','a','r','t','e','d',0};
     static const WCHAR usbhub[] = {'U','s','b','h','u','b',0};
+#endif
     struct service_entry **services_list;
     unsigned int i = 0;
     unsigned int size = 32;
@@ -270,12 +274,14 @@ static void scmdatabase_autostart_services(struct scmdatabase *db)
         argv[1] = NULL;
         err = service_start(service, 1, argv);
         /* FIXME: do something if the service failed to start */
+#ifdef HAVE_LIBUSB
         if (!strcmpW(service->name, usbhub))
         {
             HANDLE event = CreateEventW(NULL, TRUE, FALSE, usbhub_started_event);
             WaitForSingleObject(event, 30000);
             CloseHandle(event);
         }
+#endif
         release_service(service);
     }
 
-- 
1.6.3.3



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