]> andersk Git - gssapi-openssh.git/blobdiff - openssh/buffer.c
The man2html from jbasney on pkilab2 works whereas the standard one doesn't.
[gssapi-openssh.git] / openssh / buffer.c
index 705155c6eb2ec8bf306cc4707b99b618c7baef5b..cb0b620703ccadf23ce5eb480c6fdeb6542c018d 100644 (file)
@@ -26,9 +26,7 @@
 
 #define        BUFFER_MAX_CHUNK        0x100000
 #define        BUFFER_MAX_LEN          0xa00000
-/* try increasing to 256k in hpnxfers */
-#define        BUFFER_ALLOCSZ          0x008000  /* 32k */
-#define BUFFER_ALLOCSZ_HPN      0x040000  /* 256k */
+#define        BUFFER_ALLOCSZ          0x008000
 
 /* Initializes the buffer structure. */
 
@@ -105,8 +103,6 @@ void *
 buffer_append_space(Buffer *buffer, u_int len)
 {
        u_int newlen;
-       u_int buf_max;
-       u_int buf_alloc_sz;
        void *p;
 
        if (len > BUFFER_MAX_CHUNK)
@@ -129,15 +125,9 @@ restart:
        if (buffer_compact(buffer))
                goto restart;
 
-       /* if hpn is disabled use the smaller buffer size */
-       buf_max = BUFFER_MAX_LEN_HPN;
-       buf_alloc_sz = BUFFER_ALLOCSZ_HPN;
-
        /* Increase the size of the buffer and retry. */
-       newlen = roundup(buffer->alloc + len, buf_alloc_sz);
-
-
-       if (newlen > buf_max)
+       newlen = roundup(buffer->alloc + len, BUFFER_ALLOCSZ);
+       if (newlen > BUFFER_MAX_LEN_HPN)
                fatal("buffer_append_space: alloc %u not supported",
                    newlen);
        buffer->buf = xrealloc(buffer->buf, 1, newlen);
@@ -153,9 +143,6 @@ restart:
 int
 buffer_check_alloc(Buffer *buffer, u_int len)
 {
-        u_int buf_max;
-        u_int buf_alloc_sz;
-
        if (buffer->offset == buffer->end) {
                buffer->offset = 0;
                buffer->end = 0;
@@ -165,12 +152,7 @@ buffer_check_alloc(Buffer *buffer, u_int len)
                return (1);
        if (buffer_compact(buffer))
                goto restart;
-
-       /* if hpn is disabled use the smaller buffer size */
-       buf_max = BUFFER_MAX_LEN_HPN;
-       buf_alloc_sz = BUFFER_ALLOCSZ_HPN;
-
-       if (roundup(buffer->alloc + len, buf_alloc_sz) <= buf_max)
+       if (roundup(buffer->alloc + len, BUFFER_ALLOCSZ) <= BUFFER_MAX_LEN)
                return (1);
        return (0);
 }
This page took 0.034952 seconds and 4 git commands to generate.