mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 13:38:19 +00:00
[SERVICES]
Removing the redundant function WaitForLSA() and use ScmWaitForLsa() instead. Patch by Hermès Bélusca. See issue #7110 for more details. svn path=/trunk/; revision=56721
This commit is contained in:
parent
916fe2874f
commit
c8731b39d7
3 changed files with 9 additions and 46 deletions
|
@ -661,46 +661,6 @@ ScmDeleteMarkedServices(VOID)
|
|||
}
|
||||
|
||||
|
||||
VOID
|
||||
WaitForLSA(VOID)
|
||||
{
|
||||
HANDLE hEvent;
|
||||
DWORD dwError;
|
||||
|
||||
DPRINT("WaitForLSA() called\n");
|
||||
|
||||
hEvent = CreateEventW(NULL,
|
||||
TRUE,
|
||||
FALSE,
|
||||
L"LSA_RPC_SERVER_ACTIVE");
|
||||
if (hEvent == NULL)
|
||||
{
|
||||
dwError = GetLastError();
|
||||
DPRINT1("Failed to create the notication event (Error %lu)\n", dwError);
|
||||
|
||||
if (dwError == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
hEvent = OpenEventW(SYNCHRONIZE,
|
||||
FALSE,
|
||||
L"LSA_RPC_SERVER_ACTIVE");
|
||||
if (hEvent != NULL)
|
||||
{
|
||||
DPRINT1("Could not open the notification event!\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DPRINT("Wait for LSA!\n");
|
||||
WaitForSingleObject(hEvent, INFINITE);
|
||||
DPRINT("LSA is available!\n");
|
||||
|
||||
CloseHandle(hEvent);
|
||||
|
||||
DPRINT("WaitForLSA() done\n");
|
||||
}
|
||||
|
||||
|
||||
DWORD
|
||||
ScmCreateServiceDatabase(VOID)
|
||||
{
|
||||
|
@ -772,8 +732,8 @@ ScmCreateServiceDatabase(VOID)
|
|||
|
||||
RegCloseKey(hServicesKey);
|
||||
|
||||
/* Wait for LSA */
|
||||
WaitForLSA();
|
||||
/* Wait for the LSA server */
|
||||
ScmWaitForLsa();
|
||||
|
||||
/* Delete services that are marked for delete */
|
||||
ScmDeleteMarkedServices();
|
||||
|
|
|
@ -113,8 +113,8 @@ ScmCreateStartEvent(PHANDLE StartEvent)
|
|||
}
|
||||
|
||||
|
||||
static VOID
|
||||
ScmWaitForLsass(VOID)
|
||||
VOID
|
||||
ScmWaitForLsa(VOID)
|
||||
{
|
||||
HANDLE hEvent;
|
||||
DWORD dwError;
|
||||
|
@ -126,7 +126,7 @@ ScmWaitForLsass(VOID)
|
|||
if (hEvent == NULL)
|
||||
{
|
||||
dwError = GetLastError();
|
||||
DPRINT("Failed to create the notication event (Error %lu)\n", dwError);
|
||||
DPRINT1("Failed to create the notication event (Error %lu)\n", dwError);
|
||||
|
||||
if (dwError == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
|
@ -146,6 +146,8 @@ ScmWaitForLsass(VOID)
|
|||
DPRINT("LSA server running!\n");
|
||||
|
||||
CloseHandle(hEvent);
|
||||
|
||||
DPRINT("ScmWaitForLsa() done\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -420,7 +422,7 @@ wWinMain(HINSTANCE hInstance,
|
|||
SetConsoleCtrlHandler(ShutdownHandlerRoutine, TRUE);
|
||||
|
||||
/* Wait for the LSA server */
|
||||
ScmWaitForLsass();
|
||||
ScmWaitForLsa();
|
||||
|
||||
/* Acquire privileges to load drivers */
|
||||
AcquireLoadDriverPrivilege();
|
||||
|
|
|
@ -161,6 +161,7 @@ VOID PrintString(LPCSTR fmt, ...);
|
|||
VOID ScmLogError(DWORD dwEventId,
|
||||
WORD wStrings,
|
||||
LPCWSTR *lpStrings);
|
||||
VOID ScmWaitForLsa(VOID);
|
||||
|
||||
/* EOF */
|
||||
|
||||
|
|
Loading…
Reference in a new issue