diff --git a/reactos/ntoskrnl/KrnlFun.c b/reactos/ntoskrnl/KrnlFun.c index 0b0b6b941f2..3d3232e84fd 100644 --- a/reactos/ntoskrnl/KrnlFun.c +++ b/reactos/ntoskrnl/KrnlFun.c @@ -24,7 +24,6 @@ // - Add support for Fast Dispatch I/O. // // Ps: -// - Figure out why processes don't die. // - Generate process cookie for user-more thread. // // Ob: @@ -32,11 +31,9 @@ // - Add Directory Lock. // - Use Object Type Mutex/Lock. // - Implement handle database if anyone needs it. -// - Figure out why cmd.exe won't close anymore. // // Ex: // - Use pushlocks for handle implementation. -// - Figure out why cmd.exe won't close anymore. // /////////////////////////////////////////////////////////////////////////////// diff --git a/reactos/ntoskrnl/lpc/close.c b/reactos/ntoskrnl/lpc/close.c index b74f5015675..cf569dc02b6 100644 --- a/reactos/ntoskrnl/lpc/close.c +++ b/reactos/ntoskrnl/lpc/close.c @@ -57,13 +57,11 @@ LpcpClosePort (IN PEPROCESS Process OPTIONAL, /* FIXME Race conditions here! */ - DPRINT("NiClosePort 0x%p OtherPort 0x%p State %d\n", Port, Port->OtherPort, Port->State); - /* * If the client has just closed its handle then tell the server what * happened and disconnect this port. */ - if (HandleCount == 1 && Port->State == EPORT_CONNECTED_CLIENT) + if (!(HandleCount)&& (Port->State == EPORT_CONNECTED_CLIENT)) { DPRINT("Informing server\n"); Message.u1.s1.TotalLength = sizeof(PORT_MESSAGE); @@ -85,7 +83,7 @@ LpcpClosePort (IN PEPROCESS Process OPTIONAL, * If the server has closed all of its handles then disconnect the port, * don't actually notify the client until it attempts an operation. */ - if (HandleCount == 1 && Port->State == EPORT_CONNECTED_SERVER) + if (!(HandleCount)&& (Port->State == EPORT_CONNECTED_SERVER)) { DPRINT("Cleaning up server\n"); Port->OtherPort->OtherPort = NULL; diff --git a/reactos/ntoskrnl/lpc/connect.c b/reactos/ntoskrnl/lpc/connect.c index 3b5c9c3b42c..6aa36904cfe 100644 --- a/reactos/ntoskrnl/lpc/connect.c +++ b/reactos/ntoskrnl/lpc/connect.c @@ -552,8 +552,8 @@ NtConnectPort (PHANDLE UnsafeConnectedPortHandle, Status = ObInsertObject(ConnectedPort, NULL, PORT_ALL_ACCESS, - 0, - NULL, + 1, + (PVOID*)&ConnectedPort, &ConnectedPortHandle); if (!NT_SUCCESS(Status)) {