if (!session_closed) { session_closed = TRUE; SetWindowText (hwnd, "PuTTY (inactive)"); MessageBox(hwnd, "Connection closed by remote host", "PuTTY", MB_OK | MB_ICONINFORMATION); }
session_closed = TRUE; SetWindowText (hwnd, "PuTTY (inactive)"); MessageBox(hwnd, "Connection closed by remote host", "PuTTY", MB_OK | MB_ICONINFORMATION);
static void enact_pending_netevent(void) {    static int reentering = 0;    extern int select_result(WPARAM, LPARAM);    int ret;    if (reentering)        return;                        /* don't unpend the pending */    pending_netevent = FALSE;    reentering = 1;    ret = select_result (pend_netevent_wParam, pend_netevent_lParam);    reentering = 0;    if (ret == 0) {	if (cfg.close_on_exit)	    PostQuitMessage(0);	else {            if (!session_closed) {                session_closed = TRUE;                SetWindowText (hwnd, "PuTTY (inactive)");                MessageBox(hwnd, "Connection closed by remote host",                           "PuTTY", MB_OK | MB_ICONINFORMATION);            }	}    }}