-/* $Id: session.c,v 1.3 2002/10/29 04:45:54 rex Exp $
+/* $Id: session.c,v 1.4 2003/12/21 20:11:46 ea Exp $
*
* PROJECT : ReactOS / POSIX+ Environment Subsystem Server
* FILE : reactos/subsys/psx/server/ob/session.c
NTSTATUS STDCALL
PsxInitializeSessions (VOID)
{
- debug_print (L"PSXSS: ->"__FUNCTION__);
+ debug_print (L"PSXSS: ->%s", __FUNCTION__);
/* Initalize the attributes */
Sessions.NextFreeId = 0;
Sessions.Count = 0;
PSX_NS_SESSION_PORT_TEMPLATE,
PSX_NS_SUBSYSTEM_DIRECTORY_NAME,
PSX_NS_SESSION_DIRECTORY_NAME,
- pRequest->Header.Cid.UniqueProcess
+ pRequest->Header.ClientId.UniqueProcess
);
- debug_print (L"PSXSS: "__FUNCTION__": %s", NameBuffer);
+ debug_print (L"PSXSS: %s: %s", __FUNCTION__, NameBuffer);
RtlInitUnicodeString (& Name, NameBuffer);
InitializeObjectAttributes (& Oa, & Name, 0, NULL, NULL);
RtlZeroMemory (& Sqos, sizeof Sqos);
);
if (!NT_SUCCESS(Status))
{
- debug_print (L"PSXSS: "__FUNCTION__": NtConnectPort failed with %08x\n", Status);
+ debug_print (L"PSXSS: %s: NtConnectPort failed with %08x\n", __FUNCTION__, Status);
return Status;
}
/* TODO: */
PSX_NS_SESSION_DATA_TEMPLATE,
PSX_NS_SUBSYSTEM_DIRECTORY_NAME,
PSX_NS_SESSION_DIRECTORY_NAME,
- pRequest->Header.Cid.UniqueProcess
+ pRequest->Header.ClientId.UniqueProcess
);
- debug_print (L"PSXSS: "__FUNCTION__": %s", NameBuffer);
+ debug_print (L"PSXSS: : %s", __FUNCTION__, NameBuffer);
RtlInitUnicodeString (& Name, NameBuffer);
InitializeObjectAttributes (& Oa, & Name, 0, 0, 0);
Status = NtOpenSection (
if (!NT_SUCCESS(Status))
{
NtClose (pSession->TerminalChannel.hPort);
- debug_print (L"PSXSS: "__FUNCTION__": NtOpenSection failed with %08x\n", Status);
+ debug_print (L"PSXSS: %s: NtOpenSection failed with %08x\n", __FUNCTION__, Status);
return Status;
}
pSession->TerminalChannel.Section.BaseAddress = NULL;
{
NtClose (pSession->TerminalChannel.hPort);
NtClose (pSession->TerminalChannel.Section.Handle);
- debug_print (L"PSXSS: "__FUNCTION__": NtMapViewOfSection failed with %08x\n", Status);
+ debug_print (L"PSXSS: %s: NtMapViewOfSection failed with %08x\n", __FUNCTION__, Status);
return Status;
}
return Status;
{
PPSX_SESSION Session = NULL;
- debug_print (L"PSXSS: ->"__FUNCTION__);
+ debug_print (L"PSXSS: ->%s", __FUNCTION__);
/* Create the PSX_SESSION object */
Session = RtlAllocateHeap (Server.Heap, 0, sizeof (PSX_SESSION));
if (NULL == Session)
{
- debug_print (L"PSXSS: "__FUNCTION__": failed to create a new session object");
+ debug_print (L"PSXSS: %s: failed to create a new session object", __FUNCTION__);
return STATUS_MEMORY_NOT_ALLOCATED;
}
RtlZeroMemory (Session, sizeof (PSX_SESSION));
if (INVALID_HANDLE_VALUE == Session->Heap)
{
RtlFreeHeap (Server.Heap, 0, Session);
- debug_print (L"PSX: "__FUNCTION__": failed to create a new heap for session # %d", Session->Id);
+ debug_print (L"PSX: %s: failed to create a new heap for session # %d", __FUNCTION__, Session->Id);
return STATUS_MEMORY_NOT_ALLOCATED;
}
RtlInitializeCriticalSection (& Session->Lock);
++ Sessions.Count;
UNLOCK_ALL_SESSIONS;
/* DONE */
- debug_print (L""__FUNCTION__": session # %d created", Session->Id);
+ debug_print (L"%s: session # %d created", __FUNCTION__, Session->Id);
Session->Status = SESSION_STATUS_READY;
return STATUS_SUCCESS;
}