[TRANSLATION][CLIPBRD] Italian translation implemented (#344)
[reactos.git] / base / system / smss / smloop.c
index 75948eb..ff5067a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * PROJECT:         ReactOS Windows-Compatible Session Manager
  * LICENSE:         BSD 2-Clause License
- * FILE:            base/system/smss/smss.c
+ * FILE:            base/system/smss/smloop.c
  * PURPOSE:         Main SMSS Code
  * PROGRAMMERS:     Alex Ionescu
  */
@@ -9,8 +9,9 @@
 /* INCLUDES *******************************************************************/
 
 #include "smss.h"
+
 #define NDEBUG
-#include "debug.h"
+#include <debug.h>
 
 /* GLOBALS ********************************************************************/
 
@@ -166,7 +167,7 @@ SmpStopCsr(IN PSM_API_MSG SmApiMsg,
     return STATUS_NOT_IMPLEMENTED;
 }
 
-PSM_API_HANDLER SmpApiDispatch[SmMaxApiNumber] =
+PSM_API_HANDLER SmpApiDispatch[SmpMaxApiNumber - SmpCreateForeignSessionApi] =
 {
     SmpCreateForeignSession,
     SmpSessionComplete,
@@ -221,7 +222,7 @@ SmpHandleConnectionRequest(IN HANDLE SmApiPort,
         SmpGetProcessMuSessionId(ProcessHandle, &SessionId);
     }
 
-    /* See if we already know about the caller's subystem */
+    /* See if we already know about the caller's subsystem */
     CidSubsystem = SmpLocateKnownSubSysByCid(&SbApiMsg->h.ClientId);
     if ((CidSubsystem) && (Accept))
     {
@@ -379,7 +380,7 @@ SmpApiLoop(IN PVOID Parameter)
             case LPC_CONNECTION_REQUEST:
                 /* Create the right structures for it */
                 SmpHandleConnectionRequest(SmApiPort, (PSB_API_MSG)&RequestMsg);
-                ReplyMsg =  NULL;
+                ReplyMsg = NULL;
                 break;
 
             /* A closed connection */
@@ -401,13 +402,13 @@ SmpApiLoop(IN PVOID Parameter)
                 RequestMsg.ReturnValue = STATUS_PENDING;
 
                 /* Check if the API is valid */
-                if (RequestMsg.ApiNumber >= SmMaxApiNumber)
+                if (RequestMsg.ApiNumber >= SmpMaxApiNumber)
                 {
                     /* It isn't, fail */
                     DPRINT1("Invalid API: %lx\n", RequestMsg.ApiNumber);
                     Status = STATUS_NOT_IMPLEMENTED;
                 }
-                else if ((RequestMsg.ApiNumber <= SmTerminateForeignSessionApi) &&
+                else if ((RequestMsg.ApiNumber <= SmpTerminateForeignSessionApi) &&
                          !(ClientContext->Subsystem))
                 {
                     /* It's valid, but doesn't have a subsystem with it */
@@ -422,7 +423,7 @@ SmpApiLoop(IN PVOID Parameter)
                                                                   SmApiPort);
                 }
 
-                /* Write the result valud and return the message back */
+                /* Write the result value and return the message back */
                 RequestMsg.ReturnValue = Status;
                 ReplyMsg = &RequestMsg;
                 break;