From: Hermès Bélusca-Maïto Date: Thu, 3 Jan 2013 17:18:19 +0000 (+0000) Subject: [BASESRV] X-Git-Tag: backups/ros-csrss@60644~93 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=0345e745fd329e3f335f8c8f7f039382719c902e [BASESRV] Remove a temporary DPRINT1. [CSRSRV] - Shut down debug output. - Fix some misspellings. - Fix a bug in CsrMoveSatisfiedWaits ("satisfied" waits are waits where WaitFunction was put to NULL during a previous call to CsrNotifyWait, but still not dereferenced, and which can be dereferenced by a call to CsrDereferenceWait). svn path=/branches/ros-csrss/; revision=58103 --- diff --git a/subsystems/win/basesrv/server.c b/subsystems/win/basesrv/server.c index ad017454665..c39010aaed8 100644 --- a/subsystems/win/basesrv/server.c +++ b/subsystems/win/basesrv/server.c @@ -83,7 +83,7 @@ CSR_API(BaseSrvCreateProcess) } if ((Flags & 2) == 0) { - DPRINT1("BaseSrvCreateProcess - Launching a Console process\n"); + /* We are launching a console process */ DebugFlags |= CsrProcessIsConsoleApp; } diff --git a/subsystems/win32/csrsrv/api.c b/subsystems/win32/csrsrv/api.c index 80e3d9dd3d4..b9a330742b0 100644 --- a/subsystems/win32/csrsrv/api.c +++ b/subsystems/win32/csrsrv/api.c @@ -11,7 +11,7 @@ #include "srv.h" -//#define NDEBUG +#define NDEBUG #include /* GLOBALS ********************************************************************/ @@ -1329,7 +1329,7 @@ CsrReleaseCapturedArguments(IN PCSR_API_MESSAGE ApiMessage) * @param ElementSize * Size of each element. * - * @return TRUE if validation suceeded, FALSE otherwise. + * @return TRUE if validation succeeded, FALSE otherwise. * * @remarks None. * @@ -1447,7 +1447,7 @@ Win32CsrValidateBuffer(PCSR_PROCESS ProcessData, PVOID Buffer, * @param MessageString * Pointer to the buffer containing the string to validate. * - * @return TRUE if validation suceeded, FALSE otherwise. + * @return TRUE if validation succeeded, FALSE otherwise. * * @remarks None. * diff --git a/subsystems/win32/csrsrv/init.c b/subsystems/win32/csrsrv/init.c index fa878988811..751797e925e 100644 --- a/subsystems/win32/csrsrv/init.c +++ b/subsystems/win32/csrsrv/init.c @@ -25,7 +25,7 @@ PCSR_THREAD CsrSbApiRequestThreadPtr; HANDLE CsrSmApiPort = NULL; HANDLE hSbApiPort = NULL; HANDLE CsrApiPort = NULL; -ULONG CsrDebug = 0xFFFFFFFF; // 0; +ULONG CsrDebug = 0; // 0xFFFFFFFF; ULONG CsrMaxApiRequestThreads; ULONG CsrTotalPerProcessDataLength; ULONG SessionId; diff --git a/subsystems/win32/csrsrv/procsup.c b/subsystems/win32/csrsrv/procsup.c index b516dbf606a..eb77cd1663f 100644 --- a/subsystems/win32/csrsrv/procsup.c +++ b/subsystems/win32/csrsrv/procsup.c @@ -1007,7 +1007,7 @@ CsrGetProcessLuid(IN HANDLE hProcess OPTIONAL, * @param CsrThread * Pointer to the CSR Thread to impersonate. * - * @return TRUE if impersionation suceeded, false otherwise. + * @return TRUE if impersonation succeeded, false otherwise. * * @remarks Impersonation can be recursive. * diff --git a/subsystems/win32/csrsrv/wait.c b/subsystems/win32/csrsrv/wait.c index b05706c2ef1..da33727253d 100644 --- a/subsystems/win32/csrsrv/wait.c +++ b/subsystems/win32/csrsrv/wait.c @@ -127,13 +127,13 @@ CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock, IN BOOLEAN DereferenceThread) { /* Call the wait function */ - if ((WaitBlock->WaitFunction)(WaitList, - WaitBlock->WaitThread, - &WaitBlock->WaitApiMessage, - WaitBlock->WaitContext, - WaitArgument1, - WaitArgument2, - WaitFlags)) + if (WaitBlock->WaitFunction(WaitList, + WaitBlock->WaitThread, + &WaitBlock->WaitApiMessage, + WaitBlock->WaitContext, + WaitArgument1, + WaitArgument2, + WaitFlags)) { /* The wait is done, clear the block */ WaitBlock->WaitThread->WaitBlock = NULL; @@ -175,11 +175,11 @@ CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock, /* The wait is complete, but the thread is being kept alive */ WaitBlock->WaitFunction = NULL; } - - /* The wait suceeded */ + + /* The wait succeeded */ return TRUE; } - + /* The wait failed */ return FALSE; } @@ -297,8 +297,8 @@ CsrDereferenceWait(IN PLIST_ENTRY WaitList) /* Move to the next entry */ NextEntry = NextEntry->Flink; - /* Check if there's no Wait Routine */ - if (!WaitBlock->WaitFunction) + /* Check if there's no Wait Routine (satisfied wait) */ + if (WaitBlock->WaitFunction == NULL) { /* Remove it from the Wait List */ if (WaitBlock->WaitList.Flink) @@ -366,8 +366,8 @@ CsrMoveSatisfiedWait(IN PLIST_ENTRY NewEntry, /* Go to the next entry */ NextEntry = NextEntry->Flink; - /* Check if there is a Wait Callback */ - if (WaitBlock->WaitFunction) + /* Check if there's no Wait Routine (satisfied wait) */ + if (WaitBlock->WaitFunction == NULL) { /* Remove it from the Wait Block Queue */ RemoveEntryList(&WaitBlock->WaitList); @@ -427,8 +427,8 @@ CsrNotifyWait(IN PLIST_ENTRY WaitList, /* Go to the next entry */ NextEntry = NextEntry->Flink; - /* Check if there is a Wait Callback */ - if (WaitBlock->WaitFunction) + /* Check if there is a Wait Routine */ + if (WaitBlock->WaitFunction != NULL) { /* Notify the Waiter */ NotifySuccess |= CsrNotifyWaitBlock(WaitBlock,