summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--sftp-client.c12
-rw-r--r--sftp-server.c6
3 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f8af28c0..06882f114 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,9 @@
54 - markus@cvs.openbsd.org 2001/01/31 13:48:09 54 - markus@cvs.openbsd.org 2001/01/31 13:48:09
55 [sshconnect2.c] 55 [sshconnect2.c]
56 unused 56 unused
57 - deraadt@cvs.openbsd.org 2001/02/04 08:23:08
58 [sftp-client.c sftp-server.c]
59 make gcc on the alpha even happier
57 60
5820010104 6120010104
59 - (bal) I think this is the last of the bsd-*.h that don't belong. 62 - (bal) I think this is the last of the bsd-*.h that don't belong.
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 }
diff --git a/sftp-server.c b/sftp-server.c
index ade2663e7..dd1b43c51 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -401,7 +401,8 @@ process_read(void)
401 off = get_int64(); 401 off = get_int64();
402 len = get_int(); 402 len = get_int();
403 403
404 TRACE("read id %d handle %d off %lld len %d", id, handle, off, len); 404 TRACE("read id %d handle %d off %llu len %d", id, handle,
405 (unsigned long long)off, len);
405 if (len > sizeof buf) { 406 if (len > sizeof buf) {
406 len = sizeof buf; 407 len = sizeof buf;
407 log("read change len %d", len); 408 log("read change len %d", len);
@@ -441,7 +442,8 @@ process_write(void)
441 off = get_int64(); 442 off = get_int64();
442 data = get_string(&len); 443 data = get_string(&len);
443 444
444 TRACE("write id %d handle %d off %lld len %d", id, handle, off, len); 445 TRACE("write id %d handle %d off %llu len %d", id, handle,
446 (unsigned long long)off, len);
445 fd = handle_to_fd(handle); 447 fd = handle_to_fd(handle);
446 if (fd >= 0) { 448 if (fd >= 0) {
447 if (lseek(fd, off, SEEK_SET) < 0) { 449 if (lseek(fd, off, SEEK_SET) < 0) {