Commit cbce490e authored by Andrew Tridgell's avatar Andrew Tridgell

reinstated the MAX_READ_BUFFER code. Its a nasty tradeoff - using lots

of memory vs. ssh bugs. uggh.
parent 74a7f81d
......@@ -255,9 +255,6 @@ static void read_check(int f)
read_buffer_p = read_buffer;
}
if (n > MAX_READ_BUFFER/4)
n = MAX_READ_BUFFER/4;
if (read_buffer_p != read_buffer) {
memmove(read_buffer,read_buffer_p,read_buffer_len);
read_buffer_p = read_buffer;
......@@ -385,7 +382,8 @@ static void writefd_unbuffered(int fd,char *buf,int len)
fd_count = fd;
if (!no_flush_read) {
reading = (buffer_f_in != -1);
reading = (buffer_f_in != -1) &&
(read_buffer_len < MAX_READ_BUFFER);
}
if (reading) {
......
......@@ -58,7 +58,7 @@
#define CHUNK_SIZE (32*1024)
#define MAX_MAP_SIZE (256*1024)
#define IO_BUFFER_SIZE (4092)
#define MAX_READ_BUFFER (1024*1024)
#define MAX_READ_BUFFER (10*1024*1024)
#define MAX_ARGS 1000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment