Index: base/system/services/database.c =================================================================== --- base/system/services/database.c (révision 56713) +++ base/system/services/database.c (copie de travail) @@ -661,46 +661,6 @@ } -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 @@ RegCloseKey(hServicesKey); - /* Wait for LSA */ - WaitForLSA(); + /* Wait for the LSA server */ + ScmWaitForLsass(); /* Delete services that are marked for delete */ ScmDeleteMarkedServices(); Index: base/system/services/services.c =================================================================== --- base/system/services/services.c (révision 56713) +++ base/system/services/services.c (copie de travail) @@ -113,12 +113,14 @@ } -static VOID +VOID ScmWaitForLsass(VOID) { HANDLE hEvent; DWORD dwError; + DPRINT("ScmWaitForLsass() called\n"); + hEvent = CreateEventW(NULL, TRUE, FALSE, @@ -126,7 +128,7 @@ 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 +148,10 @@ DPRINT("LSA server running!\n"); CloseHandle(hEvent); + + DPRINT("ScmWaitForLsass() done\n"); + + return; } Index: base/system/services/services.h =================================================================== --- base/system/services/services.h (révision 56713) +++ base/system/services/services.h (copie de travail) @@ -161,6 +161,7 @@ VOID ScmLogError(DWORD dwEventId, WORD wStrings, LPCWSTR *lpStrings); +VOID ScmWaitForLsass(VOID); /* EOF */