mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-20 12:38:06 -05:00
Ensure backend netevent handlers are never reentered -
fixes many strange problems with the ssh.c coroutines [originally from svn r603]
This commit is contained in:
parent
774110ee94
commit
b18de5b924
8
window.c
8
window.c
@ -524,8 +524,16 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
|
|||||||
*/
|
*/
|
||||||
static void enact_pending_netevent(void) {
|
static void enact_pending_netevent(void) {
|
||||||
int i;
|
int i;
|
||||||
|
static int reentering = 0;
|
||||||
|
|
||||||
|
if (reentering)
|
||||||
|
return; /* don't unpend the pending */
|
||||||
|
|
||||||
pending_netevent = FALSE;
|
pending_netevent = FALSE;
|
||||||
|
|
||||||
|
reentering = 1;
|
||||||
i = back->msg (pend_netevent_wParam, pend_netevent_lParam);
|
i = back->msg (pend_netevent_wParam, pend_netevent_lParam);
|
||||||
|
reentering = 0;
|
||||||
|
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user