From 2e528220e71dea5e16fcc877e061f983ab2d837e Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 6 Jul 2008 12:24:56 +0000 Subject: [PATCH] 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 --- psftp.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.11.0