/* $Id$
*
* client.c - Session Manager client Management
- *
+ *
* ReactOS Operating System
- *
+ *
* --------------------------------------------------------------------
*
* This software is free software; you can redistribute it and/or
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING.LIB. If not, write
* to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- * MA 02139, USA.
+ * MA 02139, USA.
*
* --------------------------------------------------------------------
*/
}
}
}
- return SM_INVALID_CLIENT_INDEX; // full!
+ return SM_INVALID_CLIENT_INDEX; // full!
}
/**********************************************************************
* SmpLookupClient/1 PRIVATE
}
}
}
- }
+ }
return SM_INVALID_CLIENT_INDEX;
}
/**********************************************************************
* ARGUMENTS
* Request: message received by \SmApiPort
* ClientData:
- *
+ *
* RETURN VALUES
* NTSTATUS
*/
DPRINT("SM: %s(%08lx,%08lx) called\n", __FUNCTION__,
Request, ClientData);
-
+
RtlEnterCriticalSection (& SmpClientDirectory.Lock);
/*
* Is there a subsystem bootstrap in progress?
{
PROCESS_BASIC_INFORMATION pbi;
OBJECT_ATTRIBUTES ObjectAttributes;
-
+
RtlZeroMemory (& pbi, sizeof pbi);
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
Status = NtOpenProcess(&Process,
DPRINT1("SM: %s: subsys booting with no descriptor!\n", __FUNCTION__);
Status = STATUS_NOT_FOUND;
RtlLeaveCriticalSection (& SmpClientDirectory.Lock);
- return Status;
+ return Status;
}
/*
* Check if a client for the ID already exist.
/*
* Notify to the caller the reference to the client data.
*/
- if (ClientData)
+ if (ClientData)
{
*ClientData = SmpClientDirectory.CandidateClient;
}
/* Done */
RtlLeaveCriticalSection (& SmpClientDirectory.Lock);
-
+
return STATUS_SUCCESS;
}
/**********************************************************************
if (SmpClientDirectory.Count > 0)
{
for (ClientIndex = 0; ClientIndex < SM_MAX_CLIENT_COUNT; ClientIndex ++)
- {
+ {
if ((NULL != SmpClientDirectory.Client [ClientIndex]) &&
(ProcessId == SmpClientDirectory.Client [ClientIndex]->ServerProcessId))
{
* STATUS_SUCCESS if all OK;
* STATUS_DEVICE_BUSY if another SS is still booting;
* STATUS_NO_MEMORY if client descriptor allocation failed;
- *
- *
+ *
+ *
*/
NTSTATUS STDCALL
SmCreateClient (PRTL_USER_PROCESS_INFORMATION ProcessInfo, PWSTR ProgramName)
{
NTSTATUS Status = STATUS_SUCCESS;
-
+
DPRINT("SM: %s(%lx, %S) called\n", __FUNCTION__, ProcessInfo->ProcessHandle, ProgramName);
RtlEnterCriticalSection (& SmpClientDirectory.Lock);
RtlInitializeCriticalSection(& SmpClientDirectory.CandidateClient->Lock);
SmpClientDirectory.CandidateClient->ServerProcess =
(HANDLE) ProcessInfo->ProcessHandle;
- SmpClientDirectory.CandidateClient->ServerProcessId =
+ SmpClientDirectory.CandidateClient->ServerProcessId =
(ULONG) ProcessInfo->ClientId.UniqueProcess;
/*
* Copy the program name
i->SubSystemCount = SmpClientDirectory.Count;
i->Unused = 0;
-
+
if (SmpClientDirectory.Count > 0)
{
for (ClientIndex = 0; (ClientIndex < SM_MAX_CLIENT_COUNT); ClientIndex ++)
{
NTSTATUS Status = STATUS_SUCCESS;
INT ClientIndex = SM_INVALID_CLIENT_INDEX;
-
+
DPRINT("SM: %s(%08lx) called\n", __FUNCTION__, i);
RtlEnterCriticalSection (& SmpClientDirectory.Lock);