Author: dgorbachev
Date: Thu Jun 14 20:41:55 2007
New Revision: 27174
URL:
http://svn.reactos.org/svn/reactos?rev=27174&view=rev
Log:
- Hackish solution of issue #2062.
- Turn off title change, as it can cause a deadlock.
Modified:
trunk/reactos/subsystems/win32/csrss/win32csr/conio.c
trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c
trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conio.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/conio.c (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/conio.c Thu Jun 14 20:41:55 2007
@@ -13,6 +13,9 @@
#define NDEBUG
#include <debug.h>
+extern NTSTATUS FASTCALL
+Win32CsrInsertObject2(PCSRSS_PROCESS_DATA, PHANDLE, Object_t *);
+
/* GLOBALS *******************************************************************/
#define ConioInitRect(Rect, Top, Left, Bottom, Right) \
@@ -36,14 +39,16 @@
static NTSTATUS FASTCALL
ConioConsoleFromProcessData(PCSRSS_PROCESS_DATA ProcessData, PCSRSS_CONSOLE *Console)
{
- if (NULL == ProcessData->Console)
+ PCSRSS_CONSOLE ProcessConsole = ProcessData->Console;
+
+ if (!ProcessConsole)
{
*Console = NULL;
return STATUS_SUCCESS;
}
- EnterCriticalSection(&(ProcessData->Console->Header.Lock));
- *Console = ProcessData->Console;
+ EnterCriticalSection(&(ProcessConsole->Header.Lock));
+ *Console = ProcessConsole;
return STATUS_SUCCESS;
}
@@ -219,7 +224,6 @@
return Status;
}
-
/* copy buffer contents to screen */
ConioDrawConsole(Console);
@@ -305,9 +309,9 @@
if (NewConsole || !ProcessData->bInheritHandles)
{
/* Insert the Objects */
- Status = Win32CsrInsertObject(ProcessData,
-
&Request->Data.AllocConsoleRequest.InputHandle,
- &Console->Header);
+ Status = Win32CsrInsertObject2(ProcessData,
+
&Request->Data.AllocConsoleRequest.InputHandle,
+ &Console->Header);
if (! NT_SUCCESS(Status))
{
DPRINT1("Failed to insert object\n");
@@ -316,9 +320,9 @@
return Request->Status = Status;
}
- Status = Win32CsrInsertObject(ProcessData,
-
&Request->Data.AllocConsoleRequest.OutputHandle,
- &Console->ActiveBuffer->Header);
+ Status = Win32CsrInsertObject2(ProcessData,
+
&Request->Data.AllocConsoleRequest.OutputHandle,
+ &Console->ActiveBuffer->Header);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to insert object\n");
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c Thu Jun 14 20:41:55 2007
@@ -104,6 +104,14 @@
}
NTSTATUS FASTCALL
+Win32CsrInsertObject2(PCSRSS_PROCESS_DATA ProcessData,
+ PHANDLE Handle,
+ Object_t *Object)
+{
+ return (CsrExports.CsrInsertObjectProc)(ProcessData, Handle, Object);
+}
+
+NTSTATUS FASTCALL
Win32CsrGetObject(PCSRSS_PROCESS_DATA ProcessData,
HANDLE Handle,
Object_t **Object)
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c Thu Jun 14 20:41:55 2007
@@ -1916,7 +1916,10 @@
{
Title = L"";
}
- SendMessageW(Console->hWindow, WM_SETTEXT, 0, (LPARAM) Title);
+
+ /* FIXME: deadlock */
+ //SendMessageW(Console->hWindow, WM_SETTEXT, 0, (LPARAM) Title);
+
if (NULL != Buffer)
{
HeapFree(Win32CsrApiHeap, 0, Buffer);