BUG/MINOR: stats: Fix Lua's `get_stats` function

Lua's `get_stats` function stopped working in
4cfb0019e6, due to the addition a new field
ST_F_PROTO without a corresponding entry in `stat_fields`.

Fix the issue by adding the entry, like
a46b142e88 did previously for a different field.

This patch fixes GitHub Issue #2174, it should be backported to 2.8.
This commit is contained in:
Tim Duesterhus 2023-06-01 18:58:08 +02:00 committed by Willy Tarreau
parent cb6a35fdc1
commit 33a4461fa9
1 changed files with 1 additions and 0 deletions

View File

@ -274,6 +274,7 @@ const struct name_desc stat_fields[ST_F_TOTAL_FIELDS] = {
[ST_F_H1REQ] = { .name = "h1req", .desc = "Total number of HTTP/1 sessions processed by this object since the worker process started" },
[ST_F_H2REQ] = { .name = "h2req", .desc = "Total number of hTTP/2 sessions processed by this object since the worker process started" },
[ST_F_H3REQ] = { .name = "h3req", .desc = "Total number of HTTP/3 sessions processed by this object since the worker process started" },
[ST_F_PROTO] = { .name = "proto", .desc = "Protocol" },
};
/* one line of info */