1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-27 02:02:26 +00:00

Merge branch 'pre-0.64'

This commit is contained in:
Simon Tatham 2015-02-07 12:50:31 +00:00
commit d0ca84935e

View File

@ -171,9 +171,11 @@ static DWORD WINAPI handle_input_threadfunc(void *param)
break; break;
WaitForSingleObject(ctx->ev_from_main, INFINITE); WaitForSingleObject(ctx->ev_from_main, INFINITE);
if (ctx->done) if (ctx->done) {
SetEvent(ctx->ev_to_main);
break; /* main thread told us to shut down */ break; /* main thread told us to shut down */
} }
}
if (povl) if (povl)
CloseHandle(oev); CloseHandle(oev);
@ -627,8 +629,8 @@ void handle_got_event(HANDLE event)
/* /*
* EOF, or (nearly equivalently) read error. * EOF, or (nearly equivalently) read error.
*/ */
h->u.i.gotdata(h, NULL, -h->u.i.readerr);
h->u.i.defunct = TRUE; h->u.i.defunct = TRUE;
h->u.i.gotdata(h, NULL, -h->u.i.readerr);
} else { } else {
backlog = h->u.i.gotdata(h, h->u.i.buffer, h->u.i.len); backlog = h->u.i.gotdata(h, h->u.i.buffer, h->u.i.len);
handle_throttle(&h->u.i, backlog); handle_throttle(&h->u.i, backlog);
@ -649,8 +651,8 @@ void handle_got_event(HANDLE event)
* and mark the thread as defunct (because the output * and mark the thread as defunct (because the output
* thread is terminating by now). * thread is terminating by now).
*/ */
h->u.o.sentdata(h, -h->u.o.writeerr);
h->u.o.defunct = TRUE; h->u.o.defunct = TRUE;
h->u.o.sentdata(h, -h->u.o.writeerr);
} else { } else {
bufchain_consume(&h->u.o.queued_data, h->u.o.lenwritten); bufchain_consume(&h->u.o.queued_data, h->u.o.lenwritten);
h->u.o.sentdata(h, bufchain_size(&h->u.o.queued_data)); h->u.o.sentdata(h, bufchain_size(&h->u.o.queued_data));