1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-21 13:05:04 -05:00

On cleanup, PSCP and PSFTP should explicitly check that the back end

is still running rather than relying on ssh_sftp_loop_iteration() to
return a bogus value.

[originally from svn r6803]
This commit is contained in:
Simon Tatham 2006-08-26 10:17:39 +00:00
parent 0dcdb6c3c1
commit 5765f8ceb9
2 changed files with 2 additions and 2 deletions

2
pscp.c
View File

@ -245,7 +245,7 @@ static int ssh_scp_recv(unsigned char *buf, int len)
} }
while (outlen > 0) { while (outlen > 0) {
if (ssh_sftp_loop_iteration() < 0) if (back->exitcode(backhandle) >= 0 || ssh_sftp_loop_iteration() < 0)
return 0; /* doom */ return 0; /* doom */
} }

View File

@ -2567,7 +2567,7 @@ int sftp_recvdata(char *buf, int len)
} }
while (outlen > 0) { while (outlen > 0) {
if (ssh_sftp_loop_iteration() < 0) if (back->exitcode(backhandle) >= 0 || ssh_sftp_loop_iteration() < 0)
return 0; /* doom */ return 0; /* doom */
} }