1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-04 04:52:47 -05:00

terminal.c's from_backend() no longer calls term_out(), because

term_out() can in turn call ldisc_send() which calls back to
from_backend() when local echo is enabled. This was giving rise to
crazy re-entrancy stuff and stack overflows. Instead from_backend()
deposits its data in a bufchain which term_out() empties the next
time it's called.

[originally from svn r1276]
This commit is contained in:
Simon Tatham
2001-09-18 19:41:07 +00:00
parent 8c532d7668
commit 6364ff3e71
4 changed files with 41 additions and 45 deletions

View File

@ -525,12 +525,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
session_closed = FALSE;
/*
* Set up the input and output buffers.
*/
inbuf_head = 0;
outbuf_reap = outbuf_head = 0;
/*
* Prepare the mouse handler.
*/
@ -660,8 +654,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
timer_id = 0;
}
HideCaret(hwnd);
if (inbuf_head)
term_out();
term_out();
term_update();
ShowCaret(hwnd);
@ -1392,8 +1385,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
case WM_TIMER:
if (pending_netevent)
enact_pending_netevent();
if (inbuf_head)
term_out();
term_out();
noise_regular();
HideCaret(hwnd);
term_update();