/* XXX: copy between two remote sites */
#include "includes.h"
-RCSID("$OpenBSD: sftp-client.c,v 1.1 2001/02/04 11:11:54 djm Exp $");
+RCSID("$OpenBSD: sftp-client.c,v 1.3 2001/02/04 15:32:25 stevesk Exp $");
#include "ssh.h"
#include "buffer.h"
buffer_put_int(&msg, COPY_SIZE);
send_msg(fd_out, &msg);
debug3("Sent message SSH2_FXP_READ I:%d O:%llu S:%u",
- id, offset, COPY_SIZE);
+ id, (unsigned long long)offset, COPY_SIZE);
buffer_clear(&msg);
fatal("Received more data than asked for %d > %d",
len, COPY_SIZE);
- debug3("In read loop, got %d offset %lld", len, offset);
+ debug3("In read loop, got %d offset %lld", len,
+ (unsigned long long)offset);
if (atomicio(write, local_fd, data, len) != len) {
error("Couldn't write to \"%s\": %s", local_path,
strerror(errno));
buffer_put_string(&msg, data, len);
send_msg(fd_out, &msg);
debug3("Sent message SSH2_FXP_WRITE I:%d O:%llu S:%u",
- id, offset, len);
+ id, (unsigned long long)offset, len);
status = get_status(fd_in, id);
if (status != SSH2_FX_OK) {
close(local_fd);
return(-1);
}
- debug3("In write loop, got %d offset %lld", len, offset);
+ debug3("In write loop, got %d offset %llu", len,
+ (unsigned long long)offset);
offset += len;
}
off = get_int64();
len = get_int();
- TRACE("read id %d handle %d off %lld len %d", id, handle, off, len);
+ TRACE("read id %d handle %d off %llu len %d", id, handle,
+ (unsigned long long)off, len);
if (len > sizeof buf) {
len = sizeof buf;
log("read change len %d", len);
off = get_int64();
data = get_string(&len);
- TRACE("write id %d handle %d off %lld len %d", id, handle, off, len);
+ TRACE("write id %d handle %d off %llu len %d", id, handle,
+ (unsigned long long)off, len);
fd = handle_to_fd(handle);
if (fd >= 0) {
if (lseek(fd, off, SEEK_SET) < 0) {