MINOR: sample: make smp_resolve_args() return an allocate error message
authorWilly Tarreau <w@1wt.eu>
Fri, 26 Mar 2021 15:11:55 +0000 (16:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 26 Mar 2021 15:23:45 +0000 (16:23 +0100)
commit77e6a4ef0f607ea7d1a4f10e471d685133154fd7
tree9a91723d03768e1de90e9aa0a4db2498da9fad07
parente26cd0b46c6e59400192405b0f6a6ec04ef20f2b
MINOR: sample: make smp_resolve_args() return an allocate error message

For now smp_resolve_args() complains on stderr via ha_alert(), but if we
want to make it a bit more dynamic, we need it to return errors in an
allocated message. Let's pass it an error pointer and have it fill it.
On return we indent the output if it contains more than one line.
include/haproxy/sample.h
src/cfgparse.c
src/sample.c