/* XXX: copy between two remote sites */
#include "includes.h"
-RCSID("$OpenBSD: sftp-client.c,v 1.56 2005/07/17 07:17:55 djm Exp $");
+RCSID("$OpenBSD: sftp-client.c,v 1.58 2006/01/02 01:20:31 djm Exp $");
#include "openbsd-compat/sys-queue.h"
/* Minimum amount of data to read at at time */
#define MIN_READ_SIZE 512
-/* Maximum packet size */
-#define MAX_MSG_LENGTH (256 * 1024)
-
struct sftp_conn {
int fd_in;
int fd_out;
{
u_char mlen[4];
- if (buffer_len(m) > MAX_MSG_LENGTH)
+ if (buffer_len(m) > SFTP_MAX_MSG_LENGTH)
fatal("Outbound message too long %u", buffer_len(m));
/* Send length first */
}
msg_len = buffer_get_int(m);
- if (msg_len > MAX_MSG_LENGTH)
+ if (msg_len > SFTP_MAX_MSG_LENGTH)
fatal("Received message too long %u", msg_len);
buffer_append_space(m, msg_len);
Attrib junk, *a;
Buffer msg;
char *handle;
- int local_fd, status, write_error;
+ int local_fd, status = 0, write_error;
int read_error, write_errno;
u_int64_t offset, size;
u_int handle_len, mode, type, id, buflen, num_req, max_req;