]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: server: change adm_st_chg_cause storage type
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 3 Apr 2023 15:40:28 +0000 (17:40 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 21 Apr 2023 12:36:45 +0000 (14:36 +0200)
commit9b1ccd732530d8d9a97e9800131456b9cb09d9f9
treee7cb7c71a4c18fd49d74a19e770983934741a5da
parent85b91375bf49aa7930fbfbff6910db0f8fd5c03f
MINOR: server: change adm_st_chg_cause storage type

Even though it doesn't look like it at first glance, this is more like
a cleanup than an actual code improvement:

Given that srv->adm_st_chg_cause has been used to exclusively store
static strings ever since it was implemented, we make the choice to
store it as an enum instead of a fixed-size string within server
struct.

This will allow to save some space in server struct, and will make
it more easily exportable (ie: event handlers) because of the
reduced memory footprint during handling and the ability to later get
the corresponding human-readable message when it's explicitly needed.
include/haproxy/server-t.h
include/haproxy/server.h
src/server.c
src/stats.c