mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 13:56: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);
|
RtlCopyMemory(ConnectMessage + 1, ReplyMessage + 1, ConnectionInfoLength);
|
||||||
|
|
||||||
/* At this point, if the caller refused the connection, go to cleanup */
|
/* 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 */
|
/* Otherwise, create the actual port */
|
||||||
Status = ObCreateObject(PreviousMode,
|
Status = ObCreateObject(PreviousMode,
|
||||||
|
@ -222,6 +226,11 @@ NtAcceptConnectPort(OUT PHANDLE PortHandle,
|
||||||
{
|
{
|
||||||
/* Otherwise, quit */
|
/* Otherwise, quit */
|
||||||
ObDereferenceObject(ServerPort);
|
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;
|
goto Cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,11 +437,20 @@ CsrpHandleConnectionRequest (PPORT_MESSAGE Request,
|
||||||
DPRINT1("Unable to allocate or find data for process 0x%x\n",
|
DPRINT1("Unable to allocate or find data for process 0x%x\n",
|
||||||
Request->ClientId.UniqueProcess);
|
Request->ClientId.UniqueProcess);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ProcessData)
|
||||||
|
{
|
||||||
|
/* Attach the Shared Section */
|
||||||
|
Status = CsrSrvAttachSharedSection(ProcessData, ConnectInfo);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("Connection ok\n");
|
||||||
|
AllowConnection = TRUE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Attach the Shared Section */
|
DPRINT1("Shared section map failed: %lx\n", Status);
|
||||||
Status = CsrSrvAttachSharedSection(ProcessData, ConnectInfo);
|
|
||||||
if (NT_SUCCESS(Status)) AllowConnection = TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue