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:
Simon Tatham 2000-09-20 11:40:23 +00:00
Родитель 774110ee94
Коммит b18de5b924
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -524,8 +524,16 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
*/
static void enact_pending_netevent(void) {
int i;
static int reentering = 0;
if (reentering)
return; /* don't unpend the pending */
pending_netevent = FALSE;
reentering = 1;
i = back->msg (pend_netevent_wParam, pend_netevent_lParam);
reentering = 0;
if (i < 0) {
char buf[1024];