diff --git a/include/proto/buffers.h b/include/proto/buffers.h index 86f414aa5..2b5d0561d 100644 --- a/include/proto/buffers.h +++ b/include/proto/buffers.h @@ -2,7 +2,7 @@ include/proto/buffers.h Buffer management definitions, macros and inline functions. - Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu + Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -34,7 +34,7 @@ static inline void buffer_init(struct buffer *buf) { buf->l = buf->total = buf->flags = 0; - buf->rlim = buf->h = buf->r = buf->lr = buf->w = buf->data; + buf->rlim = buf->r = buf->lr = buf->w = buf->data; } /* returns 1 if the buffer is empty, 0 otherwise */ @@ -51,7 +51,7 @@ static inline int buffer_isfull(const struct buffer *buf) { /* flushes any content from buffer */ static inline void buffer_flush(struct buffer *buf) { - buf->r = buf->h = buf->lr = buf->w = buf->data; + buf->r = buf->lr = buf->w = buf->data; buf->l = 0; } @@ -76,7 +76,7 @@ static inline int buffer_realign(struct buffer *buf) { if (buf->l == 0) { /* let's realign the buffer to optimize I/O */ - buf->r = buf->w = buf->h = buf->lr = buf->data; + buf->r = buf->w = buf->lr = buf->data; } return buffer_max(buf); } diff --git a/include/types/buffers.h b/include/types/buffers.h index 1788826f8..4afc293e3 100644 --- a/include/types/buffers.h +++ b/include/types/buffers.h @@ -2,7 +2,7 @@ include/types/buffers.h Buffer management definitions, macros and inline functions. - Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu + Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -67,7 +67,7 @@ struct buffer { int wto; /* write timeout */ int cto; /* connect timeout */ unsigned int l; /* data length */ - char *r, *w, *h, *lr; /* read ptr, write ptr, last header ptr, last read */ + char *r, *w, *lr; /* read ptr, write ptr, last read */ char *rlim; /* read limit, used for header rewriting */ unsigned long long total; /* total data read */ char data[BUFSIZE]; diff --git a/src/buffers.c b/src/buffers.c index 8dfa85796..736e4cce0 100644 --- a/src/buffers.c +++ b/src/buffers.c @@ -1,7 +1,7 @@ /* * Buffer management functions. * - * Copyright 2000-2006 Willy Tarreau + * Copyright 2000-2007 Willy Tarreau * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -95,7 +95,6 @@ int buffer_replace(struct buffer *b, char *pos, char *end, char *str) /* we only move data after the displaced zone */ if (b->r > pos) b->r += delta; if (b->w > pos) b->w += delta; - if (b->h > pos) b->h += delta; if (b->lr > pos) b->lr += delta; b->l += delta; @@ -131,7 +130,6 @@ int buffer_replace2(struct buffer *b, char *pos, char *end, char *str, int len) /* we only move data after the displaced zone */ if (b->r > pos) b->r += delta; if (b->w > pos) b->w += delta; - if (b->h > pos) b->h += delta; if (b->lr > pos) b->lr += delta; b->l += delta; @@ -160,8 +158,8 @@ int chunk_printf(struct chunk *chk, int size, const char *fmt, ...) void buffer_dump(FILE *o, struct buffer *b, int from, int to) { fprintf(o, "Dumping buffer %p\n", b); - fprintf(o, " data=%p l=%d r=%p w=%p h=%p lr=%p\n", - b->data, b->l, b->r, b->w, b->h, b->lr); + fprintf(o, " data=%p l=%d r=%p w=%p lr=%p\n", + b->data, b->l, b->r, b->w, b->lr); if (!to || to > b->l) to = b->l; diff --git a/src/stream_sock.c b/src/stream_sock.c index 2f91b0fbc..e7a55246d 100644 --- a/src/stream_sock.c +++ b/src/stream_sock.c @@ -1,7 +1,7 @@ /* * Functions operating on SOCK_STREAM and buffers. * - * Copyright 2000-2006 Willy Tarreau + * Copyright 2000-2007 Willy Tarreau * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -60,7 +60,7 @@ int stream_sock_read(int fd) { #endif { if (b->l == 0) { /* let's realign the buffer to optimize I/O */ - b->r = b->w = b->h = b->lr = b->data; + b->r = b->w = b->lr = b->data; max = b->rlim - b->data; } else if (b->r > b->w) { @@ -156,7 +156,7 @@ int stream_sock_write(int fd) { #endif if (b->l == 0) { /* let's realign the buffer to optimize I/O */ - b->r = b->w = b->h = b->lr = b->data; + b->r = b->w = b->lr = b->data; max = 0; } else if (b->r > b->w) {