Author: ion
Date: Wed Feb 15 15:03:42 2012
New Revision: 55606
URL:
http://svn.reactos.org/svn/reactos?rev=55606&view=rev
Log:
[CSRSRV2]: Formatting and a few bug fixes.
Modified:
trunk/reactos/subsystems/csr/csrsrv/init.c
trunk/reactos/subsystems/csr/main.c
Modified: trunk/reactos/subsystems/csr/csrsrv/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/init…
==============================================================================
--- trunk/reactos/subsystems/csr/csrsrv/init.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/csr/csrsrv/init.c [iso-8859-1] Wed Feb 15 15:03:42 2012
@@ -66,7 +66,7 @@
/* 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 @@
/* 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 @@
/* 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,
Modified: trunk/reactos/subsystems/csr/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/main.c?rev=…
==============================================================================
--- trunk/reactos/subsystems/csr/main.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/csr/main.c [iso-8859-1] Wed Feb 15 15:03:42 2012
@@ -51,7 +51,6 @@
UNREFERENCED_PARAMETER(envp);
UNREFERENCED_PARAMETER(DebugFlag);
-
/* Set the Priority */
NtSetInformationProcess(NtCurrentProcess(),
ProcessBasePriority,
@@ -81,7 +80,7 @@
{
/* Kill us */
DPRINT1("CSRSS: CsrServerInitialization failed:% lx\n", Status);
- NtTerminateProcess (NtCurrentProcess(), Status);
+ NtTerminateProcess(NtCurrentProcess(), Status);
}
/* Disable errors */
@@ -91,7 +90,7 @@
if (!NtCurrentPeb()->SessionId) RtlSetProcessIsCritical(TRUE, NULL, FALSE);
/* Kill this thread. CSRSRV keeps us going */
- NtTerminateThread (NtCurrentThread(), Status);
+ NtTerminateThread(NtCurrentThread(), Status);
return 0;
}