mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 10:53:15 +00:00
Treat STATUS_PORT_DISCONNECTED as full error, now that LPC ports correctly deliver the LPC_PORT_CLOSED message.
svn path=/trunk/; revision=2005
This commit is contained in:
parent
db9f10747e
commit
b5686dbcd2
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: wapi.c,v 1.11 2001/01/21 00:11:54 phreak Exp $
|
/* $Id: wapi.c,v 1.12 2001/06/23 19:20:01 phreak Exp $
|
||||||
*
|
*
|
||||||
* reactos/subsys/csrss/api/wapi.c
|
* reactos/subsys/csrss/api/wapi.c
|
||||||
*
|
*
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <ntdll/rtl.h>
|
#include <ntdll/rtl.h>
|
||||||
#include <csrss/csrss.h>
|
#include <csrss/csrss.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
#include "api.h"
|
#include "api.h"
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ static const CsrFunc CsrFuncs[] = {
|
||||||
CsrSetConsoleMode,
|
CsrSetConsoleMode,
|
||||||
CsrCreateScreenBuffer,
|
CsrCreateScreenBuffer,
|
||||||
CsrSetScreenBuffer,
|
CsrSetScreenBuffer,
|
||||||
|
CsrSetTitle,
|
||||||
0 };
|
0 };
|
||||||
|
|
||||||
static void Thread_Api2(HANDLE ServerPort)
|
static void Thread_Api2(HANDLE ServerPort)
|
||||||
|
@ -65,18 +67,18 @@ static void Thread_Api2(HANDLE ServerPort)
|
||||||
0,
|
0,
|
||||||
&Reply->Header,
|
&Reply->Header,
|
||||||
&LpcRequest.Header);
|
&LpcRequest.Header);
|
||||||
if (!NT_SUCCESS(Status) &&
|
if ( !NT_SUCCESS( Status ) )
|
||||||
Status != STATUS_PORT_DISCONNECTED)
|
|
||||||
{
|
{
|
||||||
DisplayString(L"CSR: NtReplyWaitReceivePort failed\n");
|
DisplayString(L"CSR: NtReplyWaitReceivePort failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LpcRequest.Header.MessageType == LPC_PORT_CLOSED ||
|
if ( LpcRequest.Header.MessageType == LPC_PORT_CLOSED )
|
||||||
Status == STATUS_PORT_DISCONNECTED)
|
|
||||||
{
|
{
|
||||||
CsrFreeProcessData( LpcRequest.Header.Cid.UniqueProcess );
|
CsrFreeProcessData( LpcRequest.Header.Cid.UniqueProcess );
|
||||||
NtClose(ServerPort);
|
NtClose(ServerPort);
|
||||||
NtTerminateThread(NtCurrentThread(), STATUS_SUCCESS);
|
NtTerminateThread(NtCurrentThread(), STATUS_SUCCESS);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Request = (PCSRSS_API_REQUEST)&LpcRequest;
|
Request = (PCSRSS_API_REQUEST)&LpcRequest;
|
||||||
|
|
Loading…
Reference in a new issue