Alexandre Julliard : advapi32: Don' t wait for 20 seconds if a service fails to start.
Alexandre Julliard
julliard at winehq.org
Fri Jan 4 07:12:47 CST 2008
Module: wine
Branch: master
Commit: 3133280d08538ac68b4d49aeecc1327f2eb15ddc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3133280d08538ac68b4d49aeecc1327f2eb15ddc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Jan 4 12:50:11 2008 +0100
advapi32: Don't wait for 20 seconds if a service fails to start.
---
dlls/advapi32/service.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index 8a775ad..594d607 100644
--- a/dlls/advapi32/service.c
+++ b/dlls/advapi32/service.c
@@ -455,6 +455,7 @@ static BOOL service_handle_start(HANDLE pipe, service_data *service, DWORD count
HeapFree(GetProcessHeap(), 0, service->args);
service->args = args;
args = NULL;
+ service->status.dwCurrentState = SERVICE_START_PENDING;
service->thread = CreateThread( NULL, 0, service_thread,
service, 0, NULL );
SetEvent( service_event ); /* notify the main loop */
@@ -1625,6 +1626,7 @@ static BOOL service_wait_for_startup(SC_HANDLE hService)
break;
}
r = FALSE;
+ if (status.dwCurrentState != SERVICE_START_PENDING) break;
Sleep(100 * i);
}
return r;
More information about the wine-cvs
mailing list