mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
[CSRSS]: Fix broken logic.
svn path=/trunk/; revision=53042
This commit is contained in:
parent
326dbd577b
commit
a2c84355ef
2 changed files with 22 additions and 4 deletions
|
@ -148,7 +148,11 @@ NtAcceptConnectPort(OUT PHANDLE PortHandle,
|
|||
RtlCopyMemory(ConnectMessage + 1, ReplyMessage + 1, ConnectionInfoLength);
|
||||
|
||||
/* At this point, if the caller refused the connection, go to cleanup */
|
||||
if (!AcceptConnection) goto Cleanup;
|
||||
if (!AcceptConnection)
|
||||
{
|
||||
DPRINT1("LPC connection was refused\n");
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Otherwise, create the actual port */
|
||||
Status = ObCreateObject(PreviousMode,
|
||||
|
@ -222,6 +226,11 @@ NtAcceptConnectPort(OUT PHANDLE PortHandle,
|
|||
{
|
||||
/* Otherwise, quit */
|
||||
ObDereferenceObject(ServerPort);
|
||||
DPRINT1("Client section mapping failed: %lx\n", Status);
|
||||
DPRINT1("View base, offset, size: %lx %lx %lx\n",
|
||||
ServerPort->ClientSectionBase,
|
||||
ConnectMessage->ClientView.ViewSize,
|
||||
SectionOffset);
|
||||
goto Cleanup;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -437,11 +437,20 @@ CsrpHandleConnectionRequest (PPORT_MESSAGE Request,
|
|||
DPRINT1("Unable to allocate or find data for process 0x%x\n",
|
||||
Request->ClientId.UniqueProcess);
|
||||
}
|
||||
}
|
||||
|
||||
if (ProcessData)
|
||||
{
|
||||
/* Attach the Shared Section */
|
||||
Status = CsrSrvAttachSharedSection(ProcessData, ConnectInfo);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Connection ok\n");
|
||||
AllowConnection = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Attach the Shared Section */
|
||||
Status = CsrSrvAttachSharedSection(ProcessData, ConnectInfo);
|
||||
if (NT_SUCCESS(Status)) AllowConnection = TRUE;
|
||||
DPRINT1("Shared section map failed: %lx\n", Status);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue