mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-10 13:30:11 +00:00
Right now we used to have extremely inconsistent states to report output, one is CLI_ST_PRINT which prints constant message cli->msg with the assigned severity, and CLI_ST_PRINT_FREE which prints dynamically allocated cli->err with severity LOG_ERR, and nothing in between, eventhough it's useful to be able to report dynamically allocated messages as well as constant error messages. This patch adds two extra states, which are not particularly well named given the constraints imposed by existing ones. One is CLI_ST_PRINT_ERR which prints a constant error message. The other one is CLI_ST_PRINT_DYN which prints a dynamically allocated message. By doing so we maintain the compatibility with current code. It is important to keep in mind that we cannot pre-initialize pointers and automatically detect what message type it is based on the assigned fields, because the CLI's context is in a union shared with all other users, thus unused fields contain anything upon return. This is why we have no choice but using 4 states. Keeping the two fields <msg> and <err> remains useful because one is const and not the other one, and this catches may copy-paste mistakes. It's just that <err> is pretty confusing here, it should be renamed. |
||
---|---|---|
.. | ||
acl.h | ||
action.h | ||
activity.h | ||
applet.h | ||
arg.h | ||
auth.h | ||
backend.h | ||
capture.h | ||
channel.h | ||
checks.h | ||
cli.h | ||
compression.h | ||
connection.h | ||
counters.h | ||
dict.h | ||
dns.h | ||
fd.h | ||
filters.h | ||
freq_ctr.h | ||
global.h | ||
hlua.h | ||
http_ana.h | ||
http_htx.h | ||
lb_chash.h | ||
lb_fas.h | ||
lb_fwlc.h | ||
lb_fwrr.h | ||
lb_map.h | ||
listener.h | ||
log.h | ||
mailers.h | ||
map.h | ||
obj_type.h | ||
pattern.h | ||
peers.h | ||
pipe.h | ||
port_range.h | ||
proto_udp.h | ||
protocol_buffers.h | ||
protocol.h | ||
proxy.h | ||
queue.h | ||
sample.h | ||
server.h | ||
session.h | ||
shctx.h | ||
signal.h | ||
spoe.h | ||
ssl_sock.h | ||
stats.h | ||
stick_table.h | ||
stream_interface.h | ||
stream.h | ||
task.h | ||
template.h | ||
vars.h |