]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Merge branch 'pre-0.64'
authorSimon Tatham <anakin@pobox.com>
Sat, 20 Dec 2014 18:52:40 +0000 (18:52 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 20 Dec 2014 18:52:40 +0000 (18:52 +0000)
1  2 
psftp.c

diff --combined psftp.c
index 3543a06e0f3e60e54f8afa7ed8f5bc2ad582d23d,1d331603cbf7f5ea67a641466ce1eba546c9d670..a8baad6d2e4aa25a84a1bf886514e85fd37fdde9
+++ 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);
  
      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