summaryrefslogtreecommitdiff
path: root/sftp-client.c
diff options
context:
space:
mode:
authordjm <djm>2006-01-02 12:40:50 +0000
committerdjm <djm>2006-01-02 12:40:50 +0000
commite5b4c33da1c4bf481e3f9bbd803f0118e93b5bcf (patch)
treeab34750fc1e6ff11dcf0dc1a62c11db862081311 /sftp-client.c
parent08125afa724bbdd2a3fa1c867bec072519c85436 (diff)
downloadopenssh-e5b4c33da1c4bf481e3f9bbd803f0118e93b5bcf.tar.gz
- djm@cvs.openbsd.org 2006/01/02 01:20:31
[sftp-client.c sftp-common.h sftp-server.c] use a common max. packet length, no binary change
Diffstat (limited to 'sftp-client.c')
-rw-r--r--sftp-client.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sftp-client.c b/sftp-client.c
index afbd1e6f..05bce336 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -20,7 +20,7 @@
/* XXX: copy between two remote sites */
#include "includes.h"
-RCSID("$OpenBSD: sftp-client.c,v 1.57 2005/07/27 10:39:03 dtucker Exp $");
+RCSID("$OpenBSD: sftp-client.c,v 1.58 2006/01/02 01:20:31 djm Exp $");
#include "openbsd-compat/sys-queue.h"
@@ -42,9 +42,6 @@ extern int showprogress;
/* 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;
@@ -59,7 +56,7 @@ send_msg(int fd, Buffer *m)
{
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 */
@@ -87,7 +84,7 @@ get_msg(int fd, Buffer *m)
}
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);