From: Simon Tatham Date: Sat, 20 Dec 2014 18:52:40 +0000 (+0000) Subject: Merge branch 'pre-0.64' X-Git-Tag: 0.68~637 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=23208779e78024a004f5e51c189874cb50c29af0;hp=-c;p=PuTTY.git Merge branch 'pre-0.64' --- 23208779e78024a004f5e51c189874cb50c29af0 diff --combined psftp.c index 3543a06e,1d331603..a8baad6d --- a/psftp.c +++ b/psftp.c @@@ -668,21 -668,19 +668,19 @@@ int sftp_put_file(char *fname, char *ou if (restart) { char decbuf[30]; struct fxp_attrs attrs; - int ret; req = fxp_fstat_send(fh); pktin = sftp_wait_for_reply(req); ret = fxp_fstat_recv(pktin, req, &attrs); if (!ret) { - close_rfile(file); printf("read size of %s: %s\n", outfname, fxp_error()); - return 0; + goto cleanup; } if (!(attrs.flags & SSH_FILEXFER_ATTR_SIZE)) { - close_rfile(file); printf("read size of %s: size was not given\n", outfname); - return 0; + ret = 0; + goto cleanup; } offset = attrs.size; uint64_decimal(offset, decbuf); @@@ -735,6 -733,7 +733,7 @@@ xfer_cleanup(xfer); + cleanup: req = fxp_close_send(fh); pktin = sftp_wait_for_reply(req); fxp_close_recv(pktin, req); @@@ -2506,7 -2505,16 +2505,7 @@@ void connection_fatal(void *frontend, c cleanup_exit(1); } -void ldisc_send(void *handle, char *buf, int len, int interactive) -{ - /* - * This is only here because of the calls to ldisc_send(NULL, - * 0) in ssh.c. Nothing in PSFTP actually needs to use the - * ldisc as an ldisc. So if we get called with any real data, I - * want to know about it. - */ - assert(len == 0); -} +void ldisc_echoedit_update(void *handle) { } /* * In psftp, all agent requests should be synchronous, so this is a