From 34580230cecf68453395e5698bb0176ab473748f Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 26 Aug 2006 10:17:39 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@6803 cda61777-01e9-0310-a592-d414129be87e --- pscp.c | 2 +- psftp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pscp.c b/pscp.c index a906303b..5f22828a 100644 --- a/pscp.c +++ b/pscp.c @@ -245,7 +245,7 @@ static int ssh_scp_recv(unsigned char *buf, int len) } while (outlen > 0) { - if (ssh_sftp_loop_iteration() < 0) + if (back->exitcode(backhandle) >= 0 || ssh_sftp_loop_iteration() < 0) return 0; /* doom */ } diff --git a/psftp.c b/psftp.c index 2a74bcd2..db3ae7f5 100644 --- a/psftp.c +++ b/psftp.c @@ -2567,7 +2567,7 @@ int sftp_recvdata(char *buf, int len) } while (outlen > 0) { - if (ssh_sftp_loop_iteration() < 0) + if (back->exitcode(backhandle) >= 0 || ssh_sftp_loop_iteration() < 0) return 0; /* doom */ } -- 2.11.0