]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: sample: Remove types SMP_T_CSTR and SMP_T_CBIN, replace it by SMP_F_CONST...
authorThierry FOURNIER <tfournier@exceliance.fr>
Mon, 16 Dec 2013 23:20:33 +0000 (00:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 17 Mar 2014 17:06:07 +0000 (18:06 +0100)
commit7654c9ff44b8baa90d23d8b01a0fc5158d7a19ad
tree09963a3c8dce01ae0ecb080748ba74d2450669dc
parentb0504633754d71217a1247156229cc34cc4b5a31
MEDIUM: sample: Remove types SMP_T_CSTR and SMP_T_CBIN, replace it by SMP_F_CONST flags

The operations applied on types SMP_T_CSTR and SMP_T_STR are the same,
but the check code and the declarations are double, because it must
declare action for SMP_T_C* and SMP_T_*. The declared actions and checks
are the same. this complexify the code. Only the "conv" functions can
change from "C*" to "*"

Now, if a function needs to modify input string, it can call the new
function smp_dup(). This one duplicate data in a trash buffer.
include/proto/sample.h
include/types/sample.h
src/compression.c
src/dumpstats.c
src/map.c
src/pattern.c
src/payload.c
src/proto_http.c
src/sample.c
src/ssl_sock.c
src/stick_table.c