Author: ion
Date: Wed Aug 3 03:57:30 2011
New Revision: 53042
URL:
http://svn.reactos.org/svn/reactos?rev=53042&view=rev
Log:
[CSRSS]: Fix broken logic.
Modified:
trunk/reactos/ntoskrnl/lpc/complete.c
trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
Modified: trunk/reactos/ntoskrnl/lpc/complete.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/complete.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/lpc/complete.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/lpc/complete.c [iso-8859-1] Wed Aug 3 03:57:30 2011
@@ -148,7 +148,11 @@
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 @@
{
/* 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;
}
}
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c [iso-8859-1] Wed Aug 3
03:57:30 2011
@@ -437,11 +437,20 @@
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);
}
}