From 2dbd915ad2c977fa0def5fdb2c318f4976a2ecac Mon Sep 17 00:00:00 2001 From: jacob Date: Wed, 3 Dec 2003 23:25:48 +0000 Subject: [PATCH] Spotted by Tim Kosse: reput on an already complete file was hanging. Should be fixed now (we only wait for packets if we know there are some that haven't been replied to yet). git-svn-id: svn://svn.tartarus.org/sgt/putty@3618 cda61777-01e9-0310-a592-d414129be87e --- psftp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/psftp.c b/psftp.c index c7cd8701..d395b6f1 100644 --- a/psftp.c +++ b/psftp.c @@ -616,12 +616,13 @@ int sftp_general_put(struct sftp_command *cmd, int restart) } } - pktin = sftp_recv(); - ret = xfer_upload_gotpkt(xfer, pktin); - - if (!ret) { - printf("error while writing: %s\n", fxp_error()); - err = 1; + if (!xfer_done(xfer)) { + pktin = sftp_recv(); + ret = xfer_upload_gotpkt(xfer, pktin); + if (!ret) { + printf("error while writing: %s\n", fxp_error()); + err = 1; + } } } -- 2.11.0