summaryrefslogtreecommitdiff
path: root/sftp-client.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-02-05 15:39:22 +0000
committerKevin Steves <stevesk@pobox.com>2001-02-05 15:39:22 +0000
commitec1c1409276d7fbcd43828db19496cab36079c01 (patch)
tree2bad8c4eb711e25b12a9f9bd5f00c2055840426b /sftp-client.c
parente27a5e05b3638737e8c50c24c8e955d38e31e02e (diff)
- deraadt@cvs.openbsd.org 2001/02/04 08:23:08
[sftp-client.c sftp-server.c] make gcc on the alpha even happier
Diffstat (limited to 'sftp-client.c')
-rw-r--r--sftp-client.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sftp-client.c b/sftp-client.c
index c64a43f7a..e42823841 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -29,7 +29,7 @@
29/* XXX: copy between two remote sites */ 29/* XXX: copy between two remote sites */
30 30
31#include "includes.h" 31#include "includes.h"
32RCSID("$OpenBSD: sftp-client.c,v 1.1 2001/02/04 11:11:54 djm Exp $"); 32RCSID("$OpenBSD: sftp-client.c,v 1.3 2001/02/04 15:32:25 stevesk Exp $");
33 33
34#include "ssh.h" 34#include "ssh.h"
35#include "buffer.h" 35#include "buffer.h"
@@ -621,7 +621,7 @@ do_download(int fd_in, int fd_out, char *remote_path, char *local_path,
621 buffer_put_int(&msg, COPY_SIZE); 621 buffer_put_int(&msg, COPY_SIZE);
622 send_msg(fd_out, &msg); 622 send_msg(fd_out, &msg);
623 debug3("Sent message SSH2_FXP_READ I:%d O:%llu S:%u", 623 debug3("Sent message SSH2_FXP_READ I:%d O:%llu S:%u",
624 id, offset, COPY_SIZE); 624 id, (unsigned long long)offset, COPY_SIZE);
625 625
626 buffer_clear(&msg); 626 buffer_clear(&msg);
627 627
@@ -656,7 +656,8 @@ do_download(int fd_in, int fd_out, char *remote_path, char *local_path,
656 fatal("Received more data than asked for %d > %d", 656 fatal("Received more data than asked for %d > %d",
657 len, COPY_SIZE); 657 len, COPY_SIZE);
658 658
659 debug3("In read loop, got %d offset %lld", len, offset); 659 debug3("In read loop, got %d offset %lld", len,
660 (unsigned long long)offset);
660 if (atomicio(write, local_fd, data, len) != len) { 661 if (atomicio(write, local_fd, data, len) != len) {
661 error("Couldn't write to \"%s\": %s", local_path, 662 error("Couldn't write to \"%s\": %s", local_path,
662 strerror(errno)); 663 strerror(errno));
@@ -763,7 +764,7 @@ do_upload(int fd_in, int fd_out, char *local_path, char *remote_path,
763 buffer_put_string(&msg, data, len); 764 buffer_put_string(&msg, data, len);
764 send_msg(fd_out, &msg); 765 send_msg(fd_out, &msg);
765 debug3("Sent message SSH2_FXP_WRITE I:%d O:%llu S:%u", 766 debug3("Sent message SSH2_FXP_WRITE I:%d O:%llu S:%u",
766 id, offset, len); 767 id, (unsigned long long)offset, len);
767 768
768 status = get_status(fd_in, id); 769 status = get_status(fd_in, id);
769 if (status != SSH2_FX_OK) { 770 if (status != SSH2_FX_OK) {
@@ -774,7 +775,8 @@ do_upload(int fd_in, int fd_out, char *local_path, char *remote_path,
774 close(local_fd); 775 close(local_fd);
775 return(-1); 776 return(-1);
776 } 777 }
777 debug3("In write loop, got %d offset %lld", len, offset); 778 debug3("In write loop, got %d offset %llu", len,
779 (unsigned long long)offset);
778 780
779 offset += len; 781 offset += len;
780 } 782 }