X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/2c4369de118a77ddd5528bdd72debf1b3afe3c37..e91a8c3ff65ba7bc91d65940ed7c6cc7d6700f5f:/sftp-client.c diff --git a/sftp-client.c b/sftp-client.c index 8778439b..42eb2b41 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.65 2006/04/16 00:54:10 djm Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.75 2006/10/22 02:25:50 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -23,16 +23,26 @@ #include "includes.h" #include +#include +#include "openbsd-compat/sys-queue.h" #ifdef HAVE_SYS_STAT_H # include #endif -# include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#include -#include "openbsd-compat/sys-queue.h" +#include +#include +#include +#include +#include +#include +#include -#include "buffer.h" -#include "bufaux.h" #include "xmalloc.h" +#include "buffer.h" #include "log.h" #include "atomicio.h" #include "progressmeter.h" @@ -72,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)); @@ -1124,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);