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

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Чт Апр 30 16:59:39 MSD 2009


---
 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.1.3.GIT



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