1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix double "Network error" message on SSH/Windows.

On Windows, PuTTY using the SSH backend could emit messages like
"Network error: Network error: Software caused connection abort".

When ssh.c regained the ability to emit plug_closing error messages in
ed0104c2fe (after it disappeared in fe6caf563c), it came with an extra
"Network error:". But winnet.c already adds that prefix.

This changes it back the way it was, which is also consistent with the
other backends.
This commit is contained in:
Jacob Nevins 2019-04-08 23:36:12 +01:00
parent dfc215d0c0
commit cf91937bd6
2 changed files with 2 additions and 2 deletions

2
ssh.c
View File

@ -580,7 +580,7 @@ static void ssh_closing(Plug *plug, const char *error_msg, int error_code,
{
Ssh *ssh = container_of(plug, Ssh, plug);
if (error_msg) {
ssh_remote_error(ssh, "Network error: %s", error_msg);
ssh_remote_error(ssh, "%s", error_msg);
} else if (ssh->bpp) {
ssh->bpp->input_eof = true;
queue_idempotent_callback(&ssh->bpp->ic_in_raw);

View File

@ -133,7 +133,7 @@ static void server_closing(Plug *plug, const char *error_msg, int error_code,
{
server *srv = container_of(plug, server, plug);
if (error_msg) {
ssh_remote_error(&srv->ssh, "Network error: %s", error_msg);
ssh_remote_error(&srv->ssh, "%s", error_msg);
} else if (srv->bpp) {
srv->bpp->input_eof = true;
queue_idempotent_callback(&srv->bpp->ic_in_raw);