projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
71ab0b5
)
[SYSSETUP] SetupStartService: Remove the wait loop
author
Eric Kohl
<eric.kohl@reactos.org>
Sun, 19 Aug 2018 12:31:43 +0000
(14:31 +0200)
committer
Eric Kohl
<eric.kohl@reactos.org>
Sun, 19 Aug 2018 12:32:29 +0000
(14:32 +0200)
CORE-14909
dll/win32/syssetup/install.c
patch
|
blob
|
history
diff --git
a/dll/win32/syssetup/install.c
b/dll/win32/syssetup/install.c
index
e9b5745
..
63fa4a2
100644
(file)
--- a/
dll/win32/syssetup/install.c
+++ b/
dll/win32/syssetup/install.c
@@
-1508,9
+1508,7
@@
SetupStartService(
{
SC_HANDLE hManager = NULL;
SC_HANDLE hService = NULL;
{
SC_HANDLE hManager = NULL;
SC_HANDLE hService = NULL;
- SERVICE_STATUS ServiceStatus;
DWORD dwError = ERROR_SUCCESS;
DWORD dwError = ERROR_SUCCESS;
- DWORD dwRetries = 0;
hManager = OpenSCManagerW(NULL,
NULL,
hManager = OpenSCManagerW(NULL,
NULL,
@@
-1523,7
+1521,7
@@
SetupStartService(
hService = OpenServiceW(hManager,
lpServiceName,
hService = OpenServiceW(hManager,
lpServiceName,
- SERVICE_START
| (bWait) ? SERVICE_QUERY_STATUS : 0
);
+ SERVICE_START);
if (hService == NULL)
{
dwError = GetLastError();
if (hService == NULL)
{
dwError = GetLastError();
@@
-1533,27
+1531,7
@@
SetupStartService(
if (!StartService(hService, 0, NULL))
{
dwError = GetLastError();
if (!StartService(hService, 0, NULL))
{
dwError = GetLastError();
- if (dwError != ERROR_SERVICE_ALREADY_RUNNING)
- goto done;
-
- if (bWait)
- {
- for (;;)
- {
- if (!QueryServiceStatus(hService, &ServiceStatus))
- break;
-
- if (ServiceStatus.dwCurrentState != SERVICE_START_PENDING)
- break;
-
- if (dwRetries == 30)
- break;
-
- dwRetries++;
-
- Sleep(5000);
- }
- }
+ goto done;
}
done:
}
done: