]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: make the trash be a chunk instead of a char *
authorWilly Tarreau <w@1wt.eu>
Mon, 29 Oct 2012 15:51:55 +0000 (16:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Oct 2012 15:57:30 +0000 (16:57 +0100)
commit19d14ef104b569c18d381c1259df0b409f39119a
treefaa014de57145654c1aef123d01737c19f1ba88f
parent7780473c3bbb7359d5d2861eb8421f9db24d70cd
MEDIUM: make the trash be a chunk instead of a char *

The trash is used everywhere to store the results of temporary strings
built out of s(n)printf, or as a storage for a chunk when chunks are
needed.

Using global.tune.bufsize is not the most convenient thing either.

So let's replace trash with a chunk and directly use it as such. We can
then use trash.size as the natural way to get its size, and get rid of
many intermediary chunks that were previously used.

The patch is huge because it touches many areas but it makes the code
a lot more clear and even outlines places where trash was used without
being that obvious.
14 files changed:
include/types/global.h
src/acl.c
src/appsession.c
src/cfgparse.c
src/checks.c
src/connection.c
src/dumpstats.c
src/frontend.c
src/haproxy.c
src/peers.c
src/proto_http.c
src/session.c
src/ssl_sock.c
src/stream_interface.c