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:
12
window.c
12
window.c
@ -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();
|
||||
|
Reference in New Issue
Block a user