From 45043db6ffc32717e1bf455e1f699c42a64f3201 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 11 Dec 1999 01:42:44 +0000 Subject: [PATCH] Added waiting for port requests svn path=/trunk/; revision=849 --- reactos/subsys/smss/smapi.c | 48 ++++++++++++++++++++++++++++--------- reactos/subsys/smss/smss.h | 1 + 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/reactos/subsys/smss/smapi.c b/reactos/subsys/smss/smapi.c index 42c2ad0aa8c..a16c3216013 100644 --- a/reactos/subsys/smss/smapi.c +++ b/reactos/subsys/smss/smapi.c @@ -1,4 +1,5 @@ -/* +/* $Id: smapi.c,v 1.2 1999/12/11 01:42:44 ekohl Exp $ + * * Reactos Session Manager * * @@ -9,28 +10,53 @@ #include "smss.h" +//#define NDEBUG VOID STDCALL -SmApiThread(HANDLE Port) +SmApiThread (HANDLE Port) { - ULONG count; + NTSTATUS Status; + ULONG Unknown; + PLPCMESSAGE Reply = NULL; + LPCMESSAGE Message; - DisplayString (L"SmApiThread running...\n"); +#ifndef NDEBUG + DisplayString (L"SmApiThread: running\n"); +#endif -#if 0 - NtSuspendThread (NtCurrentThread(), &count); - - while (TRUE) + for (;;) { +#ifndef NDEBUG + DisplayString (L"SmApiThread: waiting for message\n"); +#endif + Status = NtReplyWaitReceivePort (Port, + &Unknown, + Reply, + &Message); + if (NT_SUCCESS(Status)) + { +#ifndef NDEBUG + DisplayString (L"SmApiThread: message received\n"); +#endif + if (Message.MessageType == LPC_CONNECTION_REQUEST) + { + + } + else + { + + } + + } } +#ifndef NDEBUG + DisplayString (L"SmApiThread: terminating\n"); #endif - DisplayString (L"SmApiThread terminating...\n"); - - NtTerminateThread(NtCurrentThread(), 0); + NtTerminateThread (NtCurrentThread (), STATUS_UNSUCCESSFUL); } /* EOF */ diff --git a/reactos/subsys/smss/smss.h b/reactos/subsys/smss/smss.h index eccdba9ac82..71d07245dff 100644 --- a/reactos/subsys/smss/smss.h +++ b/reactos/subsys/smss/smss.h @@ -20,6 +20,7 @@ BOOL InitSessionManager (HANDLE Children[]); /* smss.c */ void DisplayString (LPCWSTR lpwString); +void PrintString (char* fmt,...); /* smapi.c */