From: simon Date: Sun, 6 Jul 2008 12:24:56 +0000 (+0000) Subject: Patch from Tim Kosse: check back->exitcode() in both loops on X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/2e528220e71dea5e16fcc877e061f983ab2d837e?hp=20c2ef842b6b0bed1d569c05060f3cea526c3d35 Patch from Tim Kosse: check back->exitcode() in both loops on ssh_sftp_loop_iteration(), not just one. Fixes exiting on a negative response to the host key confirmation prompt on Windows (because winsftp.c doesn't have the equivalent of uxsftp.c's no_fds_ok); on Unix it worked already but gave a suboptimal error message, which is fixed too by this patch. git-svn-id: svn://svn.tartarus.org/sgt/putty@8110 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/psftp.c b/psftp.c index 2e25d97c..cb5add3f 100644 --- a/psftp.c +++ b/psftp.c @@ -2798,6 +2798,8 @@ static int psftp_connect(char *userhost, char *user, int portnumber) back->provide_logctx(backhandle, logctx); console_provide_logctx(logctx); while (!back->sendok(backhandle)) { + if (back->exitcode(backhandle) >= 0) + return 1; if (ssh_sftp_loop_iteration() < 0) { fprintf(stderr, "ssh_init: error during SSH connection setup\n"); return 1;