Author: fireball Date: Sun Mar 26 00:04:40 2006 New Revision: 21392
URL: http://svn.reactos.ru/svn/reactos?rev=21392&view=rev Log: - Fix DbgPrint -> DPRINT1, commented out DbgPrint -> DPRINT - Fix a pair of places where failure results in no debug message - Formatting is still UGLY. To be fixed later.
Modified: trunk/reactos/base/system/winlogon/winlogon.c
Modified: trunk/reactos/base/system/winlogon/winlogon.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/base/system/winlogon/winlogo... ============================================================================== --- trunk/reactos/base/system/winlogon/winlogon.c (original) +++ trunk/reactos/base/system/winlogon/winlogon.c Sun Mar 26 00:04:40 2006 @@ -127,7 +127,7 @@ { Sleep(1000);
- //DbgPrint("WL: Attempting to open event "SvcctrlStartEvent_A3725DX"\n"); + DPRINT("WL: Attempting to open event "SvcctrlStartEvent_A3725DX"\n"); ServicesInitEvent = OpenEvent(EVENT_ALL_ACCESS, //SYNCHRONIZE, FALSE, L"SvcctrlStartEvent_A3725DX"); @@ -139,16 +139,16 @@
if (ServicesInitEvent == NULL) { - DbgPrint("WL: Failed to open event "SvcctrlStartEvent_A3725DX"\n"); + DPRINT1("WL: Failed to open event "SvcctrlStartEvent_A3725DX"\n"); return FALSE; }
/* wait for event signalization */ - //DbgPrint("WL: Waiting forever on event handle: %x\n", ServicesInitEvent); + DPRINT("WL: Waiting forever on event handle: %x\n", ServicesInitEvent); WaitForSingleObject(ServicesInitEvent, INFINITE); - //DbgPrint("WL: Closing event object "SvcctrlStartEvent_A3725DX"\n"); + DPRINT("WL: Closing event object "SvcctrlStartEvent_A3725DX"\n"); CloseHandle(ServicesInitEvent); - //DbgPrint("WL: StartServices() Done.\n"); + DPRINT("WL: StartServices() Done.\n");
return TRUE; } @@ -170,7 +170,7 @@
if (LsassInitEvent == NULL) { - DbgPrint("WL: Failed to create lsass notification event\n"); + DPRINT1("WL: Failed to create lsass notification event\n"); return(FALSE); }
@@ -196,7 +196,7 @@ &ProcessInformation); if (!Result) { - DbgPrint("WL: Failed to execute lsass\n"); + DPRINT1("WL: Failed to execute lsass\n"); return(FALSE); }
@@ -292,7 +292,7 @@ VOID STDCALL HandleHotKey(MSG *Msg) { - DbgPrint("HOTKEY: Got hot key (%d)\n", Msg->wParam); + DPRINT1("HOTKEY: Got hot key (%d)\n", Msg->wParam);
/* CTRL-ALT-DEL */ if (Msg->wParam == 0) @@ -418,7 +418,7 @@ &WLSession->UserToken); if (!Result) { - DbgPrint ("WL: LogonUserW() failed\n"); + DPRINT1 ("WL: LogonUserW() failed\n"); RtlDestroyEnvironment (lpEnvironment); return FALSE; } @@ -436,7 +436,7 @@ if (!LoadUserProfileW (WLSession->UserToken, &ProfileInfo)) { - DbgPrint ("WL: LoadUserProfileW() failed\n"); + DPRINT1 ("WL: LoadUserProfileW() failed\n"); CloseHandle (WLSession->UserToken); RtlDestroyEnvironment (lpEnvironment); return FALSE; @@ -446,7 +446,7 @@ WLSession->UserToken, TRUE)) { - DbgPrint ("WL: CreateEnvironmentBlock() failed\n"); + DPRINT1("WL: CreateEnvironmentBlock() failed\n"); return FALSE; }
@@ -479,7 +479,7 @@ &ProcessInformation); if (!Result) { - DbgPrint ("WL: Failed to execute user shell %s\n", CommandLine); + DPRINT1("WL: Failed to execute user shell %s\n", CommandLine); if (ImpersonateLoggedOnUser(WLSession->UserToken)) { UpdatePerUserSystemParameters(0, FALSE); @@ -549,25 +549,29 @@
if(!RegisterLogonProcess(GetCurrentProcessId(), TRUE)) { - DbgPrint("WL: Could not register logon process\n"); + DPRINT1("WL: Could not register logon process\n"); NtShutdownSystem(ShutdownNoReboot); ExitProcess(0); return 0; }
#if START_LSASS - if (StartProcess(L"StartLsass")) - { - if (!StartLsass()) - { - DbgPrint("WL: Failed to start LSASS (0x%X)\n", GetLastError()); - } - } + if (StartProcess(L"StartLsass")) + { + if (!StartLsass()) + { + DPRINT1("WL: Failed to start LSASS (0x%X)\n", GetLastError()); + } + } + else + { + DPRINT1("WL: StartProcess() failed!\n"); + } #endif
if(!(WLSession = MsGinaInit())) { - DbgPrint("WL: Failed to initialize msgina.dll\n"); + DPRINT1("WL: Failed to initialize msgina.dll\n"); NtShutdownSystem(ShutdownNoReboot); ExitProcess(0); return 0; @@ -589,7 +593,7 @@ SetThreadDesktop(WLSession->ApplicationDesktop); if(!SwitchDesktop(WLSession->ApplicationDesktop)) { - DbgPrint("WL: Cannot switch to Winlogon desktop (0x%X)\n", GetLastError()); + DPRINT1("WL: Cannot switch to Winlogon desktop (0x%X)\n", GetLastError()); }
InitServices(); @@ -597,7 +601,7 @@ /* Check for pending setup */ if (GetSetupType () != 0) { - DPRINT ("Winlogon: CheckForSetup() in setup mode\n"); + DPRINT("Winlogon: CheckForSetup() in setup mode\n");
/* Run setup and reboot when done */ RunSetup(); @@ -608,11 +612,11 @@ }
#if SUPPORT_CONSOLESTART - StartConsole = !StartIntoGUI(); -#endif - if(!InitializeSAS(WLSession)) - { - DbgPrint("WL: Failed to initialize SAS\n"); + StartConsole = !StartIntoGUI(); +#endif + if(!InitializeSAS(WLSession)) + { + DPRINT1("WL: Failed to initialize SAS\n"); ExitProcess(2); return 2; } @@ -628,13 +632,13 @@ case STATUS_PORT_CONNECTION_REFUSED: /* FIXME - we don't have the 'SeTcbPrivilege' pivilege, so set it or call LsaAddAccountRights() and try again */ - DbgPrint("WL: LsaRegisterLogonProcess() returned STATUS_PORT_CONNECTION_REFUSED\n"); + DPRINT1("WL: LsaRegisterLogonProcess() returned STATUS_PORT_CONNECTION_REFUSED\n"); break; case STATUS_NAME_TOO_LONG: - DbgPrint("WL: LsaRegisterLogonProcess() returned STATUS_NAME_TOO_LONG\n"); + DPRINT1("WL: LsaRegisterLogonProcess() returned STATUS_NAME_TOO_LONG\n"); break; default: - DbgPrint("WL: Failed to connect to LSASS\n"); + DPRINT1("WL: Failed to connect to LSASS\n"); break; } return(1); @@ -645,7 +649,7 @@ if (!NT_SUCCESS(Status)) { LsaDeregisterLogonProcess(LsaHandle); - DbgPrint("WL: Failed to lookup authentication package\n"); + DPRINT1("WL: Failed to lookup authentication package\n"); return(1); } #endif @@ -734,7 +738,7 @@ } else { - DbgPrint("WL: LogonStatus != LOGON_SHUTDOWN!!!\n"); + DPRINT1("WL: LogonStatus != LOGON_SHUTDOWN!!!\n"); ExitProcess(0); } #if SUPPORT_CONSOLESTART @@ -757,7 +761,7 @@ { if(pMessage) { - DbgPrint("WL-Status: %ws\n", pMessage); + DPRINT1("WL-Status: %ws\n", pMessage); } return TRUE; } @@ -779,8 +783,12 @@ { if(!StartServices()) { - DbgPrint("WL: Failed to start Services (0x%X)\n", GetLastError()); - } + DPRINT1("WL: Failed to start Services (0x%X)\n", GetLastError()); + } + } + else + { + DPRINT1("WL: StartProcess() failed!\n"); }
return TRUE; @@ -856,7 +864,7 @@ /* the user doesn't want to login, instead pressed cancel we should display the window again so one can logon again */ /* FIXME - disconnect any connections in case we did a remote logon */ - DbgPrint("WL: DoLogin failed\n"); + DPRINT1("WL: DoLogin failed\n"); WlxAction = WLX_SAS_ACTION_NONE; } if(WlxAction == WLX_SAS_ACTION_NONE)