]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: chunks: centralize the trash chunk allocation
authorWilly Tarreau <w@1wt.eu>
Sun, 23 Dec 2012 19:22:19 +0000 (20:22 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 23 Dec 2012 20:46:07 +0000 (21:46 +0100)
commit47ca54505c87ffac1fe5037c5ec5376ca975bfcf
tree000e67637f24050c1b61054db604dbd1111b6266
parent3ed22a43905dd449732398af7b9db4a24b310fab
MINOR: chunks: centralize the trash chunk allocation

At the moment, we need trash chunks almost everywhere and the only
correctly implemented one is in the sample code. Let's move this to
the chunks so that all other places can use this allocator.

Additionally, the get_trash_chunk() function now really returns two
different chunks. Previously it used to always overwrite the same
chunk and point it to a different buffer, which was a bit tricky
because it's not obvious that two consecutive results do alias each
other.
include/common/chunk.h
include/proto/sample.h
src/chunk.c
src/haproxy.c
src/proto_http.c
src/sample.c
src/ssl_sock.c