[MINOR] removed the ->h member in struct buffer
The buffer does not need the header pointer anymore, it has
been removed everywhere.
diff --git a/include/proto/buffers.h b/include/proto/buffers.h
index 86f414a..2b5d056 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 @@
/* flushes any content from buffer <buf> */
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 @@
{
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 1788826..4afc293 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 @@
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 8dfa857..736e4cc 100644
--- a/src/buffers.c
+++ b/src/buffers.c
@@ -1,7 +1,7 @@
/*
* Buffer management functions.
*
- * Copyright 2000-2006 Willy Tarreau <w@1wt.eu>
+ * Copyright 2000-2007 Willy Tarreau <w@1wt.eu>
*
* 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 @@
/* 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 @@
/* 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 @@
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 2f91b0f..e7a5524 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 <w@1wt.eu>
+ * Copyright 2000-2007 Willy Tarreau <w@1wt.eu>
*
* 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 @@
#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 @@
#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) {