]> andersk Git - openssh.git/blobdiff - sftp-client.c
- jmc@cvs.openbsd.org 2007/01/12 20:20:41
[openssh.git] / sftp-client.c
index 5ba4f0a9f44f8d978bcb4625fd8aeae7780f5f88..42eb2b41bfce2ddf31224f98502c93a9cf15609e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.68 2006/07/17 01:31:09 stevesk Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.75 2006/10/22 02:25:50 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
  *
 #include "includes.h"
 
 #include <sys/types.h>
+#include <sys/param.h>
+#include "openbsd-compat/sys-queue.h"
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <sys/uio.h>
 
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
 #include <unistd.h>
 
-#include "openbsd-compat/sys-queue.h"
-
-#include "buffer.h"
-#include "bufaux.h"
 #include "xmalloc.h"
+#include "buffer.h"
 #include "log.h"
 #include "atomicio.h"
 #include "progressmeter.h"
@@ -76,7 +82,7 @@ send_msg(int fd, Buffer *m)
        iov[0].iov_len = sizeof(mlen);
        iov[1].iov_base = buffer_ptr(m);
        iov[1].iov_len = buffer_len(m);
-       
+
        if (atomiciov(writev, fd, iov, 2) != buffer_len(m) + sizeof(mlen))
                fatal("Couldn't send packet: %s", strerror(errno));
 
@@ -1128,6 +1134,8 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
                        if (status != SSH2_FX_OK) {
                                error("Couldn't write to remote file \"%s\": %s",
                                    remote_path, fx2txt(status));
+                               if (showprogress)
+                                       stop_progress_meter();
                                do_close(conn, handle, handle_len);
                                close(local_fd);
                                xfree(data);
This page took 0.042385 seconds and 4 git commands to generate.