1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 19:41:01 -05:00

Attempt to ensure that everything passed to connection_fatal() is

also logged to the Event Log, so that it's easy to cut-and-paste the
error message afterwards.

[originally from svn r1599]
This commit is contained in:
Simon Tatham
2002-03-23 18:04:27 +00:00
parent eabd704d1e
commit 36d125e1d7
5 changed files with 30 additions and 9 deletions

View File

@ -813,7 +813,8 @@ void try_send(Actual_Socket s)
s->pending_error = err;
return;
} else {
fatalbox(winsock_error_string(err));
logevent(winsock_error_string(err));
fatalbox("%s", winsock_error_string(err));
}
} else {
if (s->sending_oob) {
@ -949,8 +950,10 @@ int select_result(WPARAM wParam, LPARAM lParam)
ret = recv(s->s, buf, sizeof(buf), MSG_OOB);
noise_ultralight(ret);
if (ret <= 0) {
fatalbox(ret == 0 ? "Internal networking trouble" :
winsock_error_string(WSAGetLastError()));
char *str = (ret == 0 ? "Internal networking trouble" :
winsock_error_string(WSAGetLastError()));
logevent(str);
fatalbox("%s", str);
} else {
return plug_receive(s->plug, 2, buf, ret);
}