]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: buffers: replace buf->r with buf->p + buf->i
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Mar 2012 19:14:45 +0000 (20:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 May 2012 10:28:11 +0000 (12:28 +0200)
commit363a5bb152679f2e914421cd87f6195669702cc3
tree7ff7e34adc0e8ddb117c6569a8bb62c443430593
parent89fa706d3986acabf9391277862f8f1ee6f8bd98
MAJOR: buffers: replace buf->r with buf->p + buf->i

This change gets rid of buf->r which is always equal to buf->p + buf->i.
It removed some wrapping detection at a number of places, but required addition
of new relative offset computations at other locations. A large number of places
can be simplified now with extreme care, since most of the time, either the
pointer has to be computed once or we need a difference between the old ->w and
old ->r to compute free space. The cleanup will probably happen with the rewrite
of the buffer_input_* and buffer_output_* functions anyway.

buf->lr still has to move to the struct http_msg and be relative to buf->p
for the rework to be complete.
include/proto/buffers.h
include/types/buffers.h
src/buffers.c
src/dumpstats.c
src/proto_http.c
src/stream_sock.c