Minor changes to make the posix module partially compile.
[reactos.git] / posix / server / ob / session.c
index 8c9a55f..c8d2685 100644 (file)
@@ -1,4 +1,4 @@
-/* $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
@@ -59,7 +59,7 @@ static struct
 NTSTATUS STDCALL
 PsxInitializeSessions (VOID)
 {
-    debug_print (L"PSXSS: ->"__FUNCTION__);
+    debug_print (L"PSXSS: ->%s", __FUNCTION__);
     /* Initalize the attributes */
     Sessions.NextFreeId = 0;
     Sessions.Count = 0;
@@ -91,9 +91,9 @@ PsxCreateSessionObjects (
         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);
@@ -112,7 +112,7 @@ PsxCreateSessionObjects (
              );
     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:  */
@@ -122,9 +122,9 @@ PsxCreateSessionObjects (
         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 (
@@ -135,7 +135,7 @@ PsxCreateSessionObjects (
     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;
@@ -156,7 +156,7 @@ PsxCreateSessionObjects (
     {
         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;
@@ -182,12 +182,12 @@ PsxCreateSession (
 {
     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));
@@ -210,7 +210,7 @@ PsxCreateSession (
     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);
@@ -229,7 +229,7 @@ PsxCreateSession (
     ++ 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;
 }