mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
[CSRSRV2]: Formatting and a few bug fixes.
svn path=/trunk/; revision=55606
This commit is contained in:
@@ -66,7 +66,7 @@ CsrParseServerCommandLine(IN ULONG ArgumentCount,
|
||||
/* Save our Session ID, and create a Directory for it */
|
||||
SessionId = NtCurrentPeb()->SessionId;
|
||||
Status = CsrCreateSessionObjectDirectory(SessionId);
|
||||
if (NT_SUCCESS(Status))
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("CSRSS: CsrCreateSessionObjectDirectory failed (%lx)\n",
|
||||
Status);
|
||||
@@ -82,9 +82,9 @@ CsrParseServerCommandLine(IN ULONG ArgumentCount,
|
||||
/* Split Name and Value */
|
||||
ParameterName = Arguments[i];
|
||||
ParameterValue = NULL;
|
||||
ParameterValue = strchr(ParameterName, L'=');
|
||||
if (ParameterValue) *ParameterValue++ = '\0';
|
||||
DPRINT("Name=%S, Value=%S\n", ParameterName, ParameterValue);
|
||||
ParameterValue = strchr(ParameterName, '=');
|
||||
if (ParameterValue) *ParameterValue++ = ANSI_NULL;
|
||||
DPRINT1("Name=%s, Value=%s\n", ParameterName, ParameterValue);
|
||||
|
||||
/* Check for Object Directory */
|
||||
if (!_stricmp(ParameterName, "ObjectDirectory"))
|
||||
@@ -107,8 +107,7 @@ CsrParseServerCommandLine(IN ULONG ArgumentCount,
|
||||
/* Create it */
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&CsrDirectoryName,
|
||||
OBJ_OPENIF | OBJ_CASE_INSENSITIVE |
|
||||
(SessionId) ? 0 : OBJ_PERMANENT,
|
||||
OBJ_OPENIF | OBJ_CASE_INSENSITIVE | OBJ_PERMANENT,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtCreateDirectoryObject(&CsrObjectDirectory,
|
||||
|
||||
@@ -51,7 +51,6 @@ _main(int argc,
|
||||
UNREFERENCED_PARAMETER(envp);
|
||||
UNREFERENCED_PARAMETER(DebugFlag);
|
||||
|
||||
|
||||
/* Set the Priority */
|
||||
NtSetInformationProcess(NtCurrentProcess(),
|
||||
ProcessBasePriority,
|
||||
@@ -81,7 +80,7 @@ _main(int argc,
|
||||
{
|
||||
/* Kill us */
|
||||
DPRINT1("CSRSS: CsrServerInitialization failed:% lx\n", Status);
|
||||
NtTerminateProcess (NtCurrentProcess(), Status);
|
||||
NtTerminateProcess(NtCurrentProcess(), Status);
|
||||
}
|
||||
|
||||
/* Disable errors */
|
||||
@@ -91,7 +90,7 @@ _main(int argc,
|
||||
if (!NtCurrentPeb()->SessionId) RtlSetProcessIsCritical(TRUE, NULL, FALSE);
|
||||
|
||||
/* Kill this thread. CSRSRV keeps us going */
|
||||
NtTerminateThread (NtCurrentThread(), Status);
|
||||
NtTerminateThread(NtCurrentThread(), Status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user